mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02:00
Chainparams: Get rid of CChainParams& Params(std::string)
This commit is contained in:
@@ -40,7 +40,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
|
||||
char a = '\0';
|
||||
stream.write(&a, 1); // Prevent compaction
|
||||
|
||||
Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();
|
||||
const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
|
||||
|
||||
while (state.KeepRunning()) {
|
||||
CBlock block; // Note that CBlock caches its checked state, so we need to recreate it here
|
||||
@@ -48,7 +48,7 @@ static void DeserializeAndCheckBlockTest(benchmark::State& state)
|
||||
assert(stream.Rewind(sizeof(block_bench::block413567)));
|
||||
|
||||
CValidationState validationState;
|
||||
assert(CheckBlock(block, validationState, params));
|
||||
assert(CheckBlock(block, validationState, chainParams->GetConsensus()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user