Page MenuHomePhabricator

test: call VerifyLoadedChainstate during ChainTestingSetup
ClosedPublic

Authored by PiRK on Oct 3 2023, 13:19.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC71742ac7d667: test: call VerifyLoadedChainstate during ChainTestingSetup
Summary

for additional coverage and similarity to actual init process.

This is a backport of core#23736

Test Plan

ninja check

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Oct 3 2023, 13:19
bytesofman added inline comments.
src/test/util/setup_common.cpp
244 ↗(On Diff #42507)

the core PR calls chainparams.GetConsensus(), instead of GetConfig() -- why the discrepancy?

src/test/util/setup_common.cpp
244 ↗(On Diff #42507)

This is one of the early changes in Bitcoin ABC vs Bitcoin Core, we wrap the chain params (among other things) in a Config object. This object has a GetChainParams() function to access the chain params, which the VerifyLoadedChainstate uses.

See D29

src/test/util/setup_common.cpp
244 ↗(On Diff #42507)

and D139

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/util/setup_common.cpp
248 ↗(On Diff #42507)

This is the worst use of std::optional I've ever seen

This revision is now accepted and ready to land.Oct 4 2023, 08:57