25 const auto loader{MakeWalletLoader(*test_setup->m_node.chain, test_setup->m_args)};
28 int NUM_WATCH_ONLY_ADDR = 20;
40 std::vector<CScript> scripts_watch_only;
41 for (
int w = 0; w < NUM_WATCH_ONLY_ADDR; ++w) {
52 for (
int j = 0; j < 500; ++j) {
62 mtx.
vout.emplace_back(
COIN, scripts_watch_only.at(j % NUM_WATCH_ONLY_ADDR));
73 assert(res->watchonly_wallet);
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
static constexpr CAmount COIN
The amount of satoshis in one BTC.
#define Assert(val)
Identity function.
An encapsulated private key.
CPrivKey GetPrivKey() const
Convert the private key to a CPrivKey (serialized OpenSSL private key data).
CPubKey GetPubKey() const
Compute the public key from a private key.
An encapsulated public key.
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.
Bench & epochs(size_t numEpochs) noexcept
Controls number of epochs, the number of measurements to perform.
Bench & epochIterations(uint64_t numIters) noexcept
Sets exactly the number of iterations for each epoch.
bool LoadKey(const CKey &key, const CPubKey &pubkey)
Adds a key to the store, without saving it to disk (used by LoadWallet).
bool LoadWatchOnly(const CScript &dest)
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet).
Access to the wallet database.
bool WriteBestBlock(const CBlockLocator &locator)
bool WriteWatchOnly(const CScript &script, const CKeyMetadata &keymeta)
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)
CKey GenerateRandomKey(bool compressed) noexcept
static void WalletMigration(benchmark::Bench &bench)
util::Result< MigrationResult > MigrateLegacyToDescriptor(const std::string &wallet_name, const SecureString &passphrase, WalletContext &context)
Do all steps to migrate a legacy wallet to a descriptor wallet.
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
A mutable version of CTransaction.
std::vector< CTxOut > vout