mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
Merge bitcoin/bitcoin#24672: init: add missing cs_main lock
0346c26fca
init: add missing cs_main lock (Anthony Towns) Pull request description: `BlockManager::m_block_tree_db` is protected by `cs_main`, so take the `cs_main` lock while accessing it. ACKs for top commit: jonatack: Code review ACK0346c26fca
Tree-SHA512: d6dff0b2d58871c7fbb281558b59fa9ad26fa75b3ceca9232277fc49ab795325e5ac3d266db49e7bda33da6de0b014b1bdebdf2c2c4347d43e50c0433a2cf06c
This commit is contained in:
commit
f10b24ad29
1 changed files with 1 additions and 1 deletions
|
@ -1541,7 +1541,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
|
||||
// ********************************************************* Step 8: start indexers
|
||||
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
|
||||
if (const auto error{CheckLegacyTxindex(*Assert(chainman.m_blockman.m_block_tree_db))}) {
|
||||
if (const auto error{WITH_LOCK(cs_main, return CheckLegacyTxindex(*Assert(chainman.m_blockman.m_block_tree_db)))}) {
|
||||
return InitError(*error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue