diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-11-30 00:23:34 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-11-30 00:23:58 +0200 |
commit | 5275db0786c24c695fa6419ae7b62d27e1c195cf (patch) | |
tree | ea5d979ad42264ee40d3036018b52dc9ec10a2ef /src/wallet | |
parent | Merge pull request #507 (diff) | |
parent | wallet2: remove confirmed transactions from detached blocks (diff) | |
download | monero-5275db0786c24c695fa6419ae7b62d27e1c195cf.tar.xz |
Merge pull request #509
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 8a172be90..c4df78ba9 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -763,6 +763,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); } //---------------------------------------------------------------------------------------------------- |