Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#!/usr/bin/env python32# Copyright (c) The Bitcoin Core developers3# Distributed under the MIT software license, see the accompanying4# file COPYING or https://opensource.org/license/mit/.5"""Special script to run each bench sanity check6"""7import shlex8import subprocess10from test_framework.test_framework import BitcoinTestFramework13class BenchSanityCheck(BitcoinTestFramework):14def set_test_params(self):15self.num_nodes = 0 # No node/datadir needed17def setup_network(self):18pass20def skip_test_if_missing_module(self):21self.skip_if_no_bitcoin_bench()23def add_options(self, parser):24parser.add_argument(25"--bench",26default=".*",27help="Regex to filter the bench to run (default=%(default)s)",28)30def run_test(self):31cmd = self.get_binaries().bench_argv() + [32f"-filter={self.options.bench}",33"-sanity-check",34]35self.log.info(f"Starting: {shlex.join(cmd)}")36subprocess.run(cmd, check=True)37self.log.info("Success!")40if __name__ == "__main__":41BenchSanityCheck(__file__).main()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.