mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-25 16:10:33 +02:00
Merge bitcoin/bitcoin#24672: init: add missing cs_main lock
0346c26fcacca8abcf67f7320fd441e564aa97d1 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 ACK 0346c26fcacca8abcf67f7320fd441e564aa97d1 Tree-SHA512: d6dff0b2d58871c7fbb281558b59fa9ad26fa75b3ceca9232277fc49ab795325e5ac3d266db49e7bda33da6de0b014b1bdebdf2c2c4347d43e50c0433a2cf06c
This commit is contained in:
commit
f10b24ad29
@ -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…
x
Reference in New Issue
Block a user