mirror of
https://github.com/monero-project/monero.git
synced 2025-08-24 08:09:21 -04:00
wallet: allow attaching notes to txids
This commit is contained in:
parent
ce6f8a6324
commit
7baed9bd89
8 changed files with 193 additions and 4 deletions
|
@ -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 ¬e)
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue