HomePhabricator

Refactor: clean up PeriodicFlush()

Description

Refactor: clean up PeriodicFlush()

Summary:

PeriodicFlush() is much more convoluted than it needs to be: it has
triple nesting, local variables counting refs and return values, and
increments the mapFileUseCount iterator unnecessarily. Removing all of
that makes the function much easier to understand.

Backport of core PR19085.

Depends on D8617.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on May 27 2020, 20:15
FabienCommitted on Dec 7 2020, 16:05
FabienPushed on Dec 7 2020, 16:07
Reviewer
Restricted Project
Differential Revision
D8618: Refactor: clean up PeriodicFlush()
Parents
rABC8a99cdae3f31: wallet: Move BerkeleyBatch static functions to BerkeleyDatabase
Branches
Unknown
Tags
Unknown