Page MenuHomePhabricator

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

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

Details

Summary

https://github.com/bitcoin/bitcoin/pull/16033/commits/593a8e8a2ce177c41a7809479c0086ae0fee4b4e wallet: Use chain.lock() instead of temporary chain.assumeLocked()
https://github.com/bitcoin/bitcoin/pull/16033/commits/9402ef0739fdcd8e989c07c0595095e9608b243c Remove temporary method assumeLocked(). Remove LockingStateImpl. Remove redundant cs_main locks.


This is a backport of Core PR16033

Test Plan
ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.
src/interfaces/chain.cpp
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