mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
blockchain: lock the blockchain while pruning
This commit is contained in:
parent
1f809e7485
commit
bb0ef5b1f2
@ -3896,6 +3896,10 @@ leave:
|
||||
//------------------------------------------------------------------
|
||||
bool Blockchain::prune_blockchain(uint32_t pruning_seed)
|
||||
{
|
||||
m_tx_pool.lock();
|
||||
epee::misc_utils::auto_scope_leave_caller unlocker = epee::misc_utils::create_scope_leave_handler([&](){m_tx_pool.unlock();});
|
||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||
|
||||
return m_db->prune_blockchain(pruning_seed);
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user