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 | |
| parent | bc1bc4adb246b08adee2144ce2c7e3784f7899f1 (diff) | |
| parent | 3030e3ecff79a59bf05d5eb9db84799ae4a4ef44 (diff) | |
| download | monzero-core-5275db0786c24c695fa6419ae7b62d27e1c195cf.tar.gz monzero-core-5275db0786c24c695fa6419ae7b62d27e1c195cf.tar.xz monzero-core-5275db0786c24c695fa6419ae7b62d27e1c195cf.zip | |
Merge pull request #509
3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
| -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); } //---------------------------------------------------------------------------------------------------- |
