9 #include <test/util/mining.h> 10 #include <test/util/setup_common.h> 11 #include <test/util/wallet.h> 17 TestingSetup test_setup{
25 const auto& ADDRESS_WATCHONLY = ADDRESS_BCRT1_UNSPENDABLE;
29 wallet.SetupLegacyScriptPubKeyMan();
38 for (
int i = 0; i < 100; ++i) {
44 auto bal =
wallet.GetBalance();
47 if (set_dirty)
wallet.MarkDirty();
49 if (add_mine)
assert(bal.m_mine_trusted > 0);
50 if (add_watchonly)
assert(bal.m_watchonly_trusted > 0);
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase()
Return object for accessing temporary in-memory database.
bool(* handler)(const util::Ref &context, HTTPRequest *req, const std::string &strReq)
void SyncWithValidationInterfaceQueue()
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...
static const std::string REGTEST
static void WalletBalanceDirty(benchmark::Bench &bench)
static auto & nullopt
Substitute for C++17 std::nullopt DEPRECATED use std::nullopt in new code.
static RPCHelpMan generatetoaddress()
BENCHMARK(WalletBalanceDirty)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void WalletBalanceClean(benchmark::Bench &bench)
RPCHelpMan importaddress()
static void WalletBalanceMine(benchmark::Bench &bench)
static void WalletBalance(benchmark::Bench &bench, const bool set_dirty, const bool add_watchonly, const bool add_mine)
static void WalletBalanceWatch(benchmark::Bench &bench)
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
static RPCHelpMan getnewaddress()
Main entry point to nanobench's benchmarking facility.
std::optional< T > Optional
Substitute for C++17 std::optional DEPRECATED use std::optional in new code.