27 auto test_setup = MakeNoLogFileContext<TestingSetup>();
31 context.
args = &test_setup->m_args;
32 context.
chain = test_setup->m_node.chain.get();
45 std::vector<bilingual_str> warnings;
47 const auto wallet_path = test_setup->m_path_root /
"test_wallet";
50 std::shared_ptr<CWallet>
wallet;
56 fs::remove(wallet_path /
"wallet.dat");
57 fs::remove(wallet_path);
59 bench.
setup(cleanup).run([&] {
60 wallet =
CreateWallet(context, wallet_name, std::nullopt, options, status, error_string, warnings);
uint256 rand256() noexcept
generate a random uint256.
Main entry point to nanobench's benchmarking facility.
detail::SetupRunner< SetupOp > setup(SetupOp setupOp)
Configure an untimed setup step per epoch (forces single-iteration epochs).
std::string ToString() const
static std::string PathToString(const path &path)
Convert path object to a byte string.
static void WalletCreate(benchmark::Bench &bench, bool encrypted)
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)
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
void WaitForDeleteWallet(std::shared_ptr< CWallet > &&wallet)
Explicitly delete the wallet.
static void WalletCreatePlain(benchmark::Bench &bench)
bool RemoveWallet(WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
static void WalletCreateEncrypted(benchmark::Bench &bench)
SecureString create_passphrase
std::optional< DatabaseFormat > require_format
WalletContext struct containing references to state shared between CWallet instances,...
interfaces::Chain * chain