HomePhabricator

Move CheckBlock() call to critical section

Description

Move CheckBlock() call to critical section

Summary:

This prevents data race for CBlock::fChecked.

Backport of core PR14841
https://github.com/bitcoin/bitcoin/pull/14841/files

Test Plan:
With TSAN enabled:

./src/test/test_bitcoin -t validation_block_tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3607

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Nov 29 2018, 11:36
FabienCommitted on Jul 9 2019, 22:01
nakihitoPushed on Jul 9 2019, 22:40
Reviewer
Restricted Project
Differential Revision
D3607: Move CheckBlock() call to critical section
Parents
rSTAGING411992b4182a: Merge #10191: [trivial] Rename unused RPC arguments 'dummy'
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/10372, tag: phabricator/base/10186