aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-11-30 00:23:34 +0200
committerRiccardo Spagni <ric@spagni.net>2015-11-30 00:23:58 +0200
commit5275db0786c24c695fa6419ae7b62d27e1c195cf (patch)
treeea5d979ad42264ee40d3036018b52dc9ec10a2ef /src/wallet
parentMerge pull request #507 (diff)
parentwallet2: remove confirmed transactions from detached blocks (diff)
downloadmonero-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.cpp8
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);
}
//----------------------------------------------------------------------------------------------------