30 std::vector<bilingual_str> warnings;
42 wallet->m_chain_notifications_handler.reset();
64 auto new_batch = new_database->MakeBatch();
71 batch->ReadAtCursor(key, value, complete);
73 new_batch->Write(key, value);
81 const auto test_setup = MakeNoLogFileContext<TestingSetup>();
82 test_setup->m_args.ForceSetArg(
"-unsafesqlitesync",
"1");
101 for (
int i = 0; i < 1000; ++i) {
std::optional< DatabaseFormat > require_format
void SyncWithValidationInterfaceQueue()
This is a synonym for the following, which asserts certain locks are not held: std::promise<void> pro...
State of transaction not confirmed or conflicting with a known block and not in the mempool...
static void BenchUnloadWallet(std::shared_ptr< CWallet > &&wallet)
Double ended buffer combining vector and stream-like interfaces.
static const std::shared_ptr< CWallet > BenchLoadWallet(std::unique_ptr< WalletDatabase > database, WalletContext &context, DatabaseOptions &options)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase(DatabaseOptions &options)
Return object for accessing temporary in-memory database.
An input of a transaction.
void NotifyWalletLoaded(WalletContext &context, const std::shared_ptr< CWallet > &wallet)
Indicate that this wallet supports DescriptorScriptPubKeyMan.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
static void WalletLoading(benchmark::Bench &bench, bool legacy_wallet)
std::vector< CTxOut > vout
void UnloadWallet(std::shared_ptr< CWallet > &&wallet)
Explicitly unload and delete the wallet.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
static std::unique_ptr< WalletDatabase > DuplicateMockDatabase(WalletDatabase &database, DatabaseOptions &options)
Bench & epochs(size_t numEpochs) noexcept
Controls number of epochs, the number of measurements to perform.
WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.
static void AddTx(CWallet &wallet)
interfaces::Chain * chain
virtual std::unique_ptr< DatabaseBatch > MakeBatch(bool flush_on_close=true)=0
Make a DatabaseBatch connected to this database.
A mutable version of CTransaction.
Main entry point to nanobench's benchmarking facility.
std::shared_ptr< CWallet > wallet
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
bool error(const char *fmt, const Args &... args)
An instance of this class represents one database.
#define Assert(val)
Identity function.
static constexpr CAmount COIN
The amount of satoshis in one BTC.