Page MenuHomePhabricator

[backport#16033] Hold cs_main when reading chainActive via getTipLocator(). Remove assumeLocked()

Authored by majcosta on May 19 2020, 00:14.


Summary wallet: Use chain.lock() instead of temporary chain.assumeLocked() Remove temporary method assumeLocked(). Remove LockingStateImpl. Remove redundant cs_main locks.

This is a backport of Core PR16033

Test Plan
ninja 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

majcosta created this revision.May 19 2020, 00:14
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 19 2020, 00:14
majcosta requested review of this revision.May 19 2020, 00:14
teamcity edited the summary of this revision. (Show Details)May 19 2020, 00:14

[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.May 19 2020, 12:14
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
266 ↗(On Diff #20254)

Please backport the std::move . Especially since this changes the comment. If you had the patch up then I'd say no problem, but I don't see it, so that's effectively introducing a gotcha.

This revision now requires changes to proceed.May 19 2020, 12:14
deadalnix accepted this revision.May 19 2020, 12:53

It was removed on the advice of the compiler, so we are good.

This revision is now accepted and ready to land.May 19 2020, 12:53