Repository navigation
consensus: Move CheckBlock() call to critical section - #14841
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
9cab291 to
5b6ae66
Compare
|
@MarcoFalke |
This prevents data race for CBlock::fChecked.
5b6ae66 to
c5ed6e7
Compare
|
@kallewoof |
|
utACK. I talked to @sdaftuar and it sounded like this change is fine, it was an incidental side effect of an earlier change. |
|
|
|
utACK c5ed6e7 |
|
Has someone validated that all other calls to checkblock are also under a lock? |
|
@gmaxwell yes ☝️ #14841 (comment) |
|
Yes, but adding the annotation would poison the blockencodings header. Not sure if that is worth it. |
|
Great! (still utACK) |
|
utACK c5ed6e7 |
|
utACK c5ed6e7 |
c5ed6e7 Move CheckBlock() call to critical section (Hennadii Stepanov) Pull request description: This is an alternative to #14803. Refs: - #14058 - #14072 - #14803 (comment) by @gmaxwell > It doesn't support multithreaded validation and there are lot of things that prevent that, which is why I was concerned. Why doesn't the lock on the block index or even cs main prevent concurrency here? - #14803 (comment) by @MarcoFalke Tree-SHA512: 2152e97106e11da5763b2748234ecd2982daadab13a0da04215f4db60af802a44ab5700f32249137d122eb13fc2a02e0f2d561d364607d727d8c6ab879339afb
…ction c5ed6e7 Move CheckBlock() call to critical section (Hennadii Stepanov) Pull request description: This is an alternative to bitcoin#14803. Refs: - bitcoin#14058 - bitcoin#14072 - bitcoin#14803 (comment) by @gmaxwell > It doesn't support multithreaded validation and there are lot of things that prevent that, which is why I was concerned. Why doesn't the lock on the block index or even cs main prevent concurrency here? - bitcoin#14803 (comment) by @MarcoFalke Tree-SHA512: 2152e97106e11da5763b2748234ecd2982daadab13a0da04215f4db60af802a44ab5700f32249137d122eb13fc2a02e0f2d561d364607d727d8c6ab879339afb
This is an alternative to #14803.
Refs: