From e916201f12363760a84fdff0584a8a250f03847b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 8 Aug 2020 14:39:04 +0000 Subject: [PATCH] wallet2: fix setting tx keys when another is already set insert doesn't actually insert if another element with the same key is already in the map --- src/wallet/wallet2.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index d7ed3e999..fe8d77b0b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -6512,8 +6512,8 @@ void wallet2::commit_tx(pending_tx& ptx) add_unconfirmed_tx(ptx.tx, amount_in, dests, payment_id, ptx.change_dts.amount, ptx.construction_data.subaddr_account, ptx.construction_data.subaddr_indices); if (store_tx_info() && ptx.tx_key != crypto::null_skey) { - m_tx_keys.insert(std::make_pair(txid, ptx.tx_key)); - m_additional_tx_keys.insert(std::make_pair(txid, ptx.additional_tx_keys)); + m_tx_keys[txid] = ptx.tx_key; + m_additional_tx_keys[txid] = ptx.additional_tx_keys; } LOG_PRINT_L2("transaction " << txid << " generated ok and sent to daemon, key_images: [" << ptx.key_images << "]"); @@ -6702,8 +6702,8 @@ bool wallet2::sign_tx(unsigned_tx_set &exported_txs, std::vector