HomePhabricator

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

Description

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

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

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3844

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Apr 11 2018, 13:28
nakihitoCommitted on Aug 12 2019, 17:36
nakihitoPushed on Aug 12 2019, 17:36
Reviewer
Restricted Owners Package
Differential Revision
D3844: Merge #11617: Avoid lock: Call FlushStateToDisk(...) regardless of fCheckForPruning
Parents
rABCcdbd2983808b: Merge #12969: Drop dead code CScript::Find
Branches
Unknown
Tags
Unknown