7#include <bitcoin-build-config.h>
30 mtx.
vin.emplace_back();
37 const auto test_setup = MakeNoLogFileContext<TestingSetup>();
40 context.
args = &test_setup->m_args;
41 context.
chain = test_setup->m_node.chain.get();
45 uint64_t create_flags = 0;
53 for (
int i = 0; i < 1000; ++i) {
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
static constexpr CAmount COIN
The amount of satoshis in one BTC.
#define Assert(val)
Identity function.
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
Bench & epochs(size_t numEpochs) noexcept
Controls number of epochs, the number of measurements to perform.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
BENCHMARK(WalletBalanceDirty, benchmark::PriorityLevel::HIGH)
std::shared_ptr< CWallet > TestLoadWallet(std::unique_ptr< WalletDatabase > database, WalletContext &context, uint64_t create_flags)
void TestUnloadWallet(std::shared_ptr< CWallet > &&wallet)
static void AddTx(CWallet &wallet)
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
std::unique_ptr< WalletDatabase > DuplicateMockDatabase(WalletDatabase &database)
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
static void WalletLoading(benchmark::Bench &bench, bool legacy_wallet)
static CTransactionRef MakeTransactionRef(Tx &&txIn)
A mutable version of CTransaction.
std::vector< CTxOut > vout
State of transaction not confirmed or conflicting with a known block and not in the mempool.
WalletContext struct containing references to state shared between CWallet instances,...
interfaces::Chain * chain