Page MenuHomePhabricator

refactor: add parkdeepreorg and automaticunparking options in ChainstateManager
ClosedPublic

Authored by PiRK on Sep 24 2025, 15:53.

Details

Summary

Remove access to the global gArgs for these arguments and replace them by adding fields to the existing ChainstateManager Options truct.

This should eventually allow users of the ChainstateManager to not rely on the global gArgs and instead pass in their own options.

Note that there is no change in behavior for automatic unparking, as the avalanche pointer arg passed to ActiveBestChain is non-null only if args.GetBoolArg("-avalanche", AVALANCHE_DEFAULT_ENABLED) (see init.cpp where node.avalanche is initialized).

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.Sep 24 2025, 15:53
src/kernel/chainstatemanager_opts.h
43 ↗(On Diff #55845)

we could also just not initialize this, as it is always set in chainstatemanager_args.cpp. But it seems cleaner to give it an explicit initial value.

This revision is now accepted and ready to land.Sep 24 2025, 18:21