7#include <bitcoin-build-config.h>
31 const auto test_setup = MakeNoLogFileContext<TestingSetup>();
34 context.
args = &test_setup->m_args;
35 context.
chain = test_setup->m_node.chain.get();
39 uint64_t create_flags = 0;
48 if (!legacy_wallet && num_combo > 0) {
50 for (
int i = 0; i < num_combo; ++i) {
55 std::vector<std::unique_ptr<Descriptor>> desc =
Parse(
"combo(" +
EncodeSecret(key) +
")", keys, error,
false);
57 auto spkm =
wallet->AddWalletDescriptor(w_desc, keys,
"",
false);
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
An encapsulated private key.
void MakeNewKey(bool fCompressed)
Generate a new private key using a cryptographic PRNG.
Serialized script, used inside transaction inputs and outputs.
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.
Descriptor with some wallet metadata.
static UniValue Parse(std::string_view raw)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
CTxDestination DecodeDestination(const std::string &str, std::string &error_msg, std::vector< int > *error_locations)
std::string EncodeSecret(const CKey &key)
BENCHMARK(WalletBalanceDirty, benchmark::PriorityLevel::HIGH)
const std::string ADDRESS_BCRT1_UNSPENDABLE
std::shared_ptr< CWallet > TestLoadWallet(std::unique_ptr< WalletDatabase > database, WalletContext &context, uint64_t create_flags)
static void WalletIsMine(benchmark::Bench &bench, bool legacy_wallet, int num_combo=0)
void TestUnloadWallet(std::shared_ptr< CWallet > &&wallet)
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
isminetype
IsMine() return codes, which depend on ScriptPubKeyMan implementation.
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
WalletContext struct containing references to state shared between CWallet instances,...
interfaces::Chain * chain
is a home for public enum and struct type definitions that are used by internally by wallet code,...