HomePhabricator

Fix BlockToJsonVerbose benchmark

Description

Fix BlockToJsonVerbose benchmark

Summary:
Currently it was not possible to run just the BlockToJsonVerboes benchmarsk because it did not set up everything it needed, running bench_bitcoin -filter=BlockToJsonVerbose caused this assert to fail:

bench_bitcoin: chainparams.cpp:506: const CChainParams& Params(): Assertion `globalChainParams' failed.

Initializing TestingSetup fixes this.

This is a backport of core#20998

Test Plan:

ninja bench-bitcoin
src/bench/bitcoin-bench -filter=BlockToJsonVerbose

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13039

Details

Provenance
Martin Ankerl <martin.ankerl@gmail.com>Authored on Jan 24 2021, 09:31
PiRKCommitted on Jan 24 2023, 11:07
PiRKPushed on Jan 24 2023, 11:07
Reviewer
Restricted Project
Differential Revision
D13039: Fix BlockToJsonVerbose benchmark
Parents
rABCdcac626d18b0: Guard CBlockIndex::nStatus/nFile/nDataPos/nUndoPos by cs_main
Branches
Unknown
Tags
Unknown

Event Timeline