Merge pull request #509

3030e3e wallet2: remove confirmed transactions from detached blocks (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2015-11-30 00:23:34 +02:00
commit 5275db0786
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -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);
}
//----------------------------------------------------------------------------------------------------