aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-20 18:19:42 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-04-26 19:07:33 +0100
commit7baed9bd8986d33d5892536f081eac284015372f (patch)
treec80fd726d87a76371796f10e39d891b37ceb0132 /src/wallet/wallet2.cpp
parentwallet: add GMT timestamps to transfers/payments (diff)
downloadmonero-7baed9bd8986d33d5892536f081eac284015372f.tar.xz
wallet: allow attaching notes to txids
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 2faf955f5..53ce23490 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -3071,6 +3071,19 @@ std::string wallet2::get_keys_file() const
return m_keys_file;
}
+void wallet2::set_tx_note(const crypto::hash &txid, const std::string &note)
+{
+ m_tx_notes[txid] = note;
+}
+
+std::string wallet2::get_tx_note(const crypto::hash &txid) const
+{
+ std::unordered_map<crypto::hash, std::string>::const_iterator i = m_tx_notes.find(txid);
+ if (i == m_tx_notes.end())
+ return std::string();
+ return i->second;
+}
+
//----------------------------------------------------------------------------------------------------
void wallet2::generate_genesis(cryptonote::block& b) {
if (m_testnet)