Page MenuHomePhabricator

Simplify semantics of ChainStateFlushed callback
ClosedPublic

Authored by markblundeberg on May 5 2019, 04:14.

Details

Summary

Previously, ChainStateFlushed would fire either if a full flush
completed (which can happen due to memory limits, forced flush, or
on its own DATABASE_WRITE_INTERVAL timer) *or* on a
ChainStateFlushed-specific DATABASE_WRITE_INTERVAL timer. This is
both less clear for clients (as there are no guarantees about a
flush having actually happened prior to the call), and reults in
extra flushes not clearly intended by the code. We drop the second
case, providing a strong guarantee without removing the periodit
timer-based flushing.

backport of second commit (9cb6cdc) from PR13106
Depends on D2927

Test Plan

make check and functional tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR13106b
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5679
Build 9420: Bitcoin ABC Buildbot (legacy)
Build 9419: arc lint + arc unit

Event Timeline

markblundeberg created this revision.May 5 2019, 04:14
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 5 2019, 04:14
Fabien accepted this revision.May 9 2019, 06:57
This revision is now accepted and ready to land.May 9 2019, 06:57
markblundeberg added inline comments.May 24 2019, 16:05
src/validationinterface.h
114 ↗(On Diff #8763)

Note for posterity: this last comment line was incorrectly backported (should have done T436 first)