28 wallet->SetupDescriptorScriptPubKeyMans();
35 if (!
wallet->AddWalletDescriptor(w_desc, provider,
"",
false))
assert(
false);
53 std::unique_ptr<wallet::DatabaseCursor> cursor = batch->GetNewCursor();
56 auto new_batch = new_database->MakeBatch();
65 new_batch->Write(key, value);
#define Assert(val)
Identity function.
uint256 GetBlockHash() const
An in-memory indexed chain of blocks.
CBlockIndex * Genesis() const
Returns the index entry for the genesis block of this chain, or nullptr if none.
CBlockIndex * Tip() const
Returns the index entry for the tip of this chain, or nullptr if none.
int Height() const
Return the maximal height in the chain.
An encapsulated private key.
Double ended buffer combining vector and stream-like interfaces.
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
An instance of this class represents one database.
virtual std::unique_ptr< DatabaseBatch > MakeBatch(bool flush_on_close=true)=0
Make a DatabaseBatch connected to this database.
Descriptor with some wallet metadata.
RAII object to check and reserve a wallet rescan.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
std::unique_ptr< Descriptor > Parse(const std::string &descriptor, FlatSigningProvider &out, std::string &error, bool require_checksum)
Parse a descriptor string.
util::Result< CTxDestination > GetNewDestination(const OutputType type, const std::string label)
std::string EncodeSecret(const CKey &key)
std::string EncodeDestination(const CTxDestination &dest)
std::unique_ptr< WalletDatabase > DuplicateMockDatabase(WalletDatabase &database, DatabaseOptions &options)
std::unique_ptr< WalletDatabase > CreateMockWalletDatabase(DatabaseOptions &options)
Return object for accessing temporary in-memory database.
std::unique_ptr< CWallet > CreateSyncedWallet(interfaces::Chain &chain, CChain &cchain, ArgsManager &args, const CKey &key)
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
RPCHelpMan getnewaddress()
CTxDestination getNewDestination(CWallet &w, OutputType output_type)
Returns a new destination, of an specific type, from the wallet.
std::shared_ptr< CWallet > wallet
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
std::optional< int > last_scanned_height
uint256 last_scanned_block
Hash and height of most recent block that was successfully scanned.
uint256 last_failed_block
Height of the most recent block that could not be scanned due to read errors or pruning.
enum wallet::CWallet::ScanResult::@17 status
bool error(const char *fmt, const Args &... args)