mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 21:57:46 +00:00
blockchain: lock the blockchain while pruning
This commit is contained in:
parent
1f809e7485
commit
bb0ef5b1f2
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue