Page MenuHomePhabricator

Move ::nMinimumChainWork into ChainstateManager
ClosedPublic

Authored by PiRK on Mar 29 2024, 14:52.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC3ece82b609c1: Move ::nMinimumChainWork into ChainstateManager
Summary

This changes the minimum chain work for the bitcoin-chainstate
executable. Previously it was uint256{}, now it is the chain's default
minimum chain work
.
This is a partial backport of core#25704 and core#26409
https://github.com/bitcoin/bitcoin/pull/25704/commits/cccca83099453bf0882bce4f897f77eee5836e8b
https://github.com/bitcoin/bitcoin/pull/26409/commits/fa29ef00adac6f0842acdd38344820a1ce0e3087

Depends on D15812

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.Mar 29 2024, 14:52
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/init.cpp
2394 ↗(On Diff #46600)

This is incredibly counter intuitive

This revision is now accepted and ready to land.Mar 29 2024, 16:38
src/init.cpp
2394 ↗(On Diff #46600)

Maybe I should change it to

Assert(!ApplyArgsManOptions(args, chainman_opts).has_value());

Still not great, but at least it explicitly shows that it is not a simple boolean.