Changeset View
Changeset View
Standalone View
Standalone View
src/bench/duplicate_inputs.cpp
// Copyright (c) 2011-2019 The Bitcoin Core developers | // Copyright (c) 2011-2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <bench/bench.h> | #include <bench/bench.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <config.h> | #include <config.h> | ||||
#include <consensus/merkle.h> | #include <consensus/merkle.h> | ||||
#include <consensus/validation.h> | #include <consensus/validation.h> | ||||
#include <pow/pow.h> | #include <pow/pow.h> | ||||
#include <random.h> | #include <random.h> | ||||
#include <script/scriptcache.h> | #include <script/scriptcache.h> | ||||
#include <test/util/setup_common.h> | |||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
static void DuplicateInputs(benchmark::State &state) { | static void DuplicateInputs(benchmark::State &state) { | ||||
RegTestingSetup test_setup; | |||||
const CScript SCRIPT_PUB{CScript(OP_TRUE)}; | const CScript SCRIPT_PUB{CScript(OP_TRUE)}; | ||||
const CChainParams &chainParams = Params(); | const CChainParams &chainParams = Params(); | ||||
const Consensus::Params &consensusParams = chainParams.GetConsensus(); | const Consensus::Params &consensusParams = chainParams.GetConsensus(); | ||||
CBlock block{}; | CBlock block{}; | ||||
CMutableTransaction coinbaseTx{}; | CMutableTransaction coinbaseTx{}; | ||||
CMutableTransaction naughtyTx{}; | CMutableTransaction naughtyTx{}; | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |