Page MenuHomePhabricator

Move ::nPruneTarget into BlockManager
ClosedPublic

Authored by PiRK on Wed, Apr 17, 20:12.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC03edbead7c24: Move ::nPruneTarget into BlockManager
Summary

It seems preferable to assign globals to a class (in this case BlockManager), than to leave them dangling. This should clarify scope for code-readers, as well as clarifying unit test behaviour.

This is a partial backport of core#25781
https://github.com/bitcoin/bitcoin/pull/25781/commits/fa721f1cab0de239a93f6bf70e3a8af26fddae8a

Depends on D16006

Test Plan

ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Wed, Apr 17, 20:12
Fabien requested changes to this revision.Thu, Apr 18, 15:55
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/node/blockmanager_args.h
1 ↗(On Diff #47251)

?
Also the copyright date mismatch the other new file above, is that expected ?

This revision now requires changes to proceed.Thu, Apr 18, 15:55

remove blank line before copyright header

The difference in the copyright years is weird, but not impossible. The PR was opened in 2022 and finally merged in 2023, so maybe some files were added or modified later during the review process

This revision is now accepted and ready to land.Thu, Apr 18, 19:52
This revision was automatically updated to reflect the committed changes.