refactoring: FlushStateToDisk -> CChainState
Summary:
Also renames global methods for clarity:
- ::FlushStateToDisk() -> CChainState::ForceFlushStateToDisk()
- This performs an unconditional flush.
- ::PruneAndFlush() -> CChainState::PruneAndFlush()
This is a partial backport of Core PR15976 : https://github.com/bitcoin/bitcoin/pull/15976/commits/3ccbc376dd313fb7666471f24f6d9370914d00f3
Depends on D6001
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6002