19 const auto test_setup = MakeNoLogFileContext<const TestingSetup>();
27 wallet.SetupDescriptorScriptPubKeyMans();
32 const std::optional<std::string> address_mine{add_mine ? std::optional<std::string>{
getnewaddress(
wallet)} : std::nullopt};
34 for (
int i = 0; i < 100; ++i) {
43 if (set_dirty)
wallet.MarkDirty();
45 if (add_mine)
assert(bal.m_mine_trusted > 0);
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.
Balance GetBalance(const CWallet &wallet, const int min_depth, bool avoid_reuse)
bool(* handler)(const std::any &context, HTTPRequest *req, const std::string &strReq)
static RPCHelpMan generatetoaddress()
const std::string ADDRESS_BCRT1_UNSPENDABLE
std::string getnewaddress(CWallet &w)
Returns a new address from the wallet.
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 WalletBalance(benchmark::Bench &bench, const bool set_dirty, const bool add_mine)
static void WalletBalanceMine(benchmark::Bench &bench)
BENCHMARK(WalletBalanceDirty)
static void WalletBalanceWatch(benchmark::Bench &bench)
static void WalletBalanceDirty(benchmark::Bench &bench)
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase()
Return object for accessing temporary in-memory database.
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.