Page MenuHomePhabricator

Merge #11617: Avoid lock: Call FlushStateToDisk(...) regardless of fCheckForPruning
ClosedPublic

Authored by nakihito on Fri, Aug 9, 20:57.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC61b72926bc84: Merge #11617: Avoid lock: Call FlushStateToDisk(...) regardless of…
Summary

0000d8f Document how FlushStateMode::NONE is handled (practicalswift)
2311c7c Call FlushStateToDisk(...) regardless of fCheckForPruning (practicalswift)

Pull request description:

FlushStateToDisk(...) won't do anything besides check if we need to prune if
FLUSH_STATE_NONE is given. We avoid reading the variable fCheckForPruning
which is guarded by the mutex cs_LastBlockFile.

Tree-SHA512: 89df06256f73503a74b9e26d580ce9ed09efaef347fae1ff6a5759a2993b0db52edd2fadb65694d27e579a5aed92127753bdf41b5bb1bd516e577fcf17f17999

Backport of Core PR11617
https://github.com/bitcoin/bitcoin/pull/11617/

Test Plan
make check
test_runner.py

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

nakihito created this revision.Fri, Aug 9, 20:57
Owners added a reviewer: Restricted Owners Package.Fri, Aug 9, 20:57
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Aug 9, 20:57
deadalnix accepted this revision.Mon, Aug 12, 05:32
This revision is now accepted and ready to land.Mon, Aug 12, 05:32