init: add missing cs_main lock#24672
Merged
maflcko merged 1 commit intobitcoin:masterfrom Mar 25, 2022
Merged
Conversation
BlockManager::m_block_tree_db is protected by cs_main, so take the cs_main lock while accessing it.
Contributor
Author
|
The use of the lambda in |
jonatack
reviewed
Mar 25, 2022
Member
|
The access is before any other threads are started (import blocks, p2p, rpc, ...), so I tagged it with "refactoring". |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Apr 2, 2022
0346c26 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 0346c26 Tree-SHA512: d6dff0b2d58871c7fbb281558b59fa9ad26fa75b3ceca9232277fc49ab795325e5ac3d266db49e7bda33da6de0b014b1bdebdf2c2c4347d43e50c0433a2cf06c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BlockManager::m_block_tree_dbis protected bycs_main, so take thecs_mainlock while accessing it.