Page MenuHomePhabricator

[backport#16793]refactor: Avoid locking cs_main in ProcessNewBlockHeaders
ClosedPublic

Authored by PiRK on Sep 29 2020, 10:02.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC8a397ebe7887: [backport#16793]refactor: Avoid locking cs_main in ProcessNewBlockHeaders
Summary

The locking was added in a previous pull request during the review phase, but the reason for this lock was later removed during the same review.

Backport of Core PR16793
Depends on D7634

Test Plan
cmake .. -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug
ninja all ckeck-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Sep 29 2020, 10:02
PiRK requested review of this revision.Sep 29 2020, 10:02

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix requested changes to this revision.Sep 29 2020, 10:21
deadalnix added a subscriber: deadalnix.

Can you make sure you compile this with clang and check for warning. Also a run with ENABLE_DEBUG would be good.

This revision now requires changes to proceed.Sep 29 2020, 10:21
PiRK edited the test plan for this revision. (Show Details)

test plan: clang, debug

deadalnix requested changes to this revision.Sep 29 2020, 13:25

I meant DEBUG_LOCKORDER

Running the executable with the -debug fag doesn't achieve anything to test this.

This revision now requires changes to proceed.Sep 29 2020, 13:25

I meant DEBUG_LOCKORDER

The developer notes mentions that -DCMAKE_BUILD_TYPE=Debug adds -DDEBUG_LOCKORDER to the compiler flags.

I haven't been able to add it any other way (-DDEBUG_LOCKORDER=TRUE/ON/true/1 all yield Manually-specified variables were not used by the project: DEBUG_LOCKORDER)

PiRK edited the test plan for this revision. (Show Details)

update test plan for full coverage with clang and DEBUG_LOCKORDER

This revision is now accepted and ready to land.Sep 30 2020, 14:34