Page MenuHomePhabricator

Require no cs_main lock for ProcessNewBlock/ActivateBestChain

Authored by Fabien on Feb 26 2019, 11:01.



This requires the removal of some very liberal (incorrect) cs_mains
sprinkled in some tests. It adds some chainActive.Tip() races, but
the tests are all single-threaded anyway.

Depends on D2607, D2617 and D2631

Partial backport of core PR11824 (commit a99b76f)

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien planned changes to this revision.Feb 26 2019, 17:22
jasonbcox added inline comments.
298 ↗(On Diff #7482)

I know this has changes planned, but just pointing out that you got some tabs in here.

298 ↗(On Diff #7482)

The planned changes are due to a missing dependency.
These tabs are normal (intended they are spaces and not real \t chars), there is an added bracket pair to limit the scope of the LOCK(cs_main). The closing bracket is just below.

deadalnix requested changes to this revision.Feb 28 2019, 14:38
deadalnix added inline comments.
67 ↗(On Diff #7502)

The patch you back-port removes this.

748 ↗(On Diff #7502)

It seems like there is some other backport missing here, because this doesn't match what's in the backported diff.

This revision now requires changes to proceed.Feb 28 2019, 14:38

Rebase on top of D2631 and remove missed lock

This revision is now accepted and ready to land.Feb 28 2019, 16:36
This revision was automatically updated to reflect the committed changes.