Skip to content

Commit d9cc26d

Browse files
committed
kernel: Remove chainman destructor in bitcoinkernel.cpp
There is no need to flush the background callbacks, since the immediate task runner is used for the validation signals, which does not have any pending callbacks. This allows for removal of the code in the destructor.
1 parent 13241aa commit d9cc26d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/kernel/bitcoinkernel.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,15 +1000,6 @@ const btck_BlockTreeEntry* btck_chainstate_manager_get_block_tree_entry_by_hash(
10001000

10011001
void btck_chainstate_manager_destroy(btck_ChainstateManager* chainman)
10021002
{
1003-
{
1004-
LOCK(btck_ChainstateManager::get(chainman).m_chainman->GetMutex());
1005-
for (Chainstate* chainstate : btck_ChainstateManager::get(chainman).m_chainman->GetAll()) {
1006-
if (chainstate->CanFlushToDisk()) {
1007-
chainstate->ForceFlushStateToDisk();
1008-
}
1009-
}
1010-
}
1011-
10121003
delete chainman;
10131004
}
10141005

0 commit comments

Comments
 (0)