17 auto test_setup = MakeNoLogFileContext<TestingSetup>();
21 context.
args = &test_setup->m_args;
22 context.
chain = test_setup->m_node.chain.get();
35 std::vector<bilingual_str> warnings;
37 auto wallet_path =
fs::PathToString(test_setup->m_path_root /
"test_wallet");
39 auto wallet =
CreateWallet(context, wallet_path, std::nullopt, options, status, error_string, warnings);
46 fs::remove_all(wallet_path);
std::optional< DatabaseFormat > require_format
BENCHMARK(WalletBalanceDirty, benchmark::PriorityLevel::HIGH)
void WaitForDeleteWallet(std::shared_ptr< CWallet > &&wallet)
Explicitly delete the wallet.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static std::string PathToString(const path &path)
Convert path object to a byte string.
SecureString create_passphrase
Indicate that this wallet supports DescriptorScriptPubKeyMan.
static void WalletCreate(benchmark::Bench &bench, bool encrypted)
bool RemoveWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.
interfaces::Chain * chain
Main entry point to nanobench's benchmarking facility.
std::shared_ptr< CWallet > CreateWallet(WalletContext &context, const std::string &name, std::optional< bool > load_on_start, DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
static void WalletCreateEncrypted(benchmark::Bench &bench)
static void WalletCreatePlain(benchmark::Bench &bench)