mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-15 08:23:46 +02:00
blockstorage: Add DeletePruneLock
Also adds basic unit test coverage for prune lock management methods.
This commit is contained in:
@@ -404,6 +404,12 @@ void BlockManager::UpdatePruneLock(const std::string& name, const PruneLockInfo&
|
||||
m_prune_locks[name] = lock_info;
|
||||
}
|
||||
|
||||
bool BlockManager::DeletePruneLock(const std::string& name)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
return m_prune_locks.erase(name) > 0;
|
||||
}
|
||||
|
||||
CBlockIndex* BlockManager::InsertBlockIndex(const uint256& hash)
|
||||
{
|
||||
AssertLockHeld(cs_main);
|
||||
|
||||
Reference in New Issue
Block a user