aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-29 11:41:37 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-29 12:07:54 +0000
commit3030e3ecff79a59bf05d5eb9db84799ae4a4ef44 (patch)
treea13cf1d9f302114fc20efc23085d185683bb7e57 /src/wallet
parentMerge pull request #501 (diff)
downloadmonero-3030e3ecff79a59bf05d5eb9db84799ae4a4ef44.tar.xz
wallet2: remove confirmed transactions from detached blocks
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index a6ac860c7..2e01101db 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -685,6 +685,14 @@ void wallet2::detach_blockchain(uint64_t height)
++it;
}
+ for (auto it = m_confirmed_txs.begin(); it != m_confirmed_txs.end(); )
+ {
+ if(height <= it->second.m_block_height)
+ it = m_confirmed_txs.erase(it);
+ else
+ ++it;
+ }
+
LOG_PRINT_L0("Detached blockchain on height " << height << ", transfers detached " << transfers_detached << ", blocks detached " << blocks_detached);
}
//----------------------------------------------------------------------------------------------------