for additional coverage and similarity to actual init process.
Followup to #23280.
186 | @@ -187,6 +187,16 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
187 | throw std::runtime_error("LoadGenesisBlock failed.");
please rebase this on master, otherwise it is needlessly hard to review. I suspect this doesn't even compile?
Not sure I follow, but it's been rebased.
To see if a commit compiles locally, you can use make. For example this commit indeed fails:
$ git checkout 1c6f4e6fe07bb111dd40e6ebfb8936f49a51c2e3 && make
HEAD is now at 1c6f4e6fe0 test: call VerifyLoadedChainstate during ChainTestingSetup
Making all in src
make[1]: Entering directory '/home/marco/workspace/btc_bitcoin_core/src'
make[2]: Entering directory '/home/marco/workspace/btc_bitcoin_core/src'
make[3]: Entering directory '/home/marco/workspace/btc_bitcoin_core'
make[3]: Leaving directory '/home/marco/workspace/btc_bitcoin_core'
CXX test/util/libtest_util_a-setup_common.o
test/util/setup_common.cpp:192:9: error: use of undeclared identifier 'fReindex'
fReindex.load(),
^
1 error generated.
make[2]: *** [Makefile:11221: test/util/libtest_util_a-setup_common.o] Error 1
make[2]: Leaving directory '/home/marco/workspace/btc_bitcoin_core/src'
make[1]: *** [Makefile:17227: all-recursive] Error 1
make[1]: Leaving directory '/home/marco/workspace/btc_bitcoin_core/src'
make: *** [Makefile:817: all-recursive] Error 1
194 | @@ -195,6 +195,16 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const 195 | true); 196 | assert(!rv.has_value()); 197 | 198 | + auto rv2 = VerifyLoadedChainstate(
any reason to call this rv instead of something that makes sense?
194 | @@ -195,6 +195,16 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const 195 | true); 196 | assert(!rv.has_value()); 197 | 198 | + auto rv2 = VerifyLoadedChainstate( 199 | + *Assert(m_node.chainman.get()),
*Assert(m_node.chainman),
I think this should also compile?
200 | + fReindex.load(), 201 | + m_args.GetBoolArg("-reindex-chainstate", false), 202 | + chainparams.GetConsensus(), 203 | + m_args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS), 204 | + m_args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL), 205 | + GetAdjustedTime);
What is the reason to use this time?
some q
@MarcoFalke all fixed, thanks.
for additional coverage and similarity to actual init process.
Code review ACK 826e12b010eda4238f9e8cd875e8915a405bed0d
Code Review ACK 826e12b010eda4238f9e8cd875e8915a405bed0d
Ready for merge?