Page MenuHomePhabricator

Refactor: clean up PeriodicFlush()
ClosedPublic

Authored by Fabien on Dec 7 2020, 13:34.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC24a934664504: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable