10#include <validation.h>
15#include <test/util/mining.h>
16#include <test/util/setup_common.h>
17#include <test/util/wallet.h>
22 const bool add_watchonly,
const bool add_mine) {
23 const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
25 const auto &ADDRESS_WATCHONLY = ADDRESS_ECREG_UNSPENDABLE;
27 const Config &config = test_setup->m_node.chainman->GetConfig();
32 wallet.SetupLegacyScriptPubKeyMan();
39 auto handler = test_setup->m_node.chain->handleNotifications(
42 const std::optional<std::string> address_mine{
49 for (
int i = 0; i < 100; ++i) {
51 address_mine.value_or(ADDRESS_WATCHONLY));
RPCHelpMan importaddress()
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
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.
static RPCHelpMan generatetoaddress()
Balance GetBalance(const CWallet &wallet, const int min_depth, bool avoid_reuse)
bool(* handler)(Config &config, const std::any &context, HTTPRequest *req, const std::string &strReq)
static RPCHelpMan getnewaddress()
static constexpr Amount zero() noexcept
void SyncWithValidationInterfaceQueue()
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...
static void WalletBalanceClean(benchmark::Bench &bench)
static void WalletBalanceMine(benchmark::Bench &bench)
BENCHMARK(WalletBalanceDirty)
static void WalletBalanceWatch(benchmark::Bench &bench)
static void WalletBalanceDirty(benchmark::Bench &bench)
static void WalletBalance(benchmark::Bench &bench, const bool set_dirty, const bool add_watchonly, const bool add_mine)
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase()
Return object for accessing temporary in-memory database.