Bitcoin Core  27.99.0
P2P Digital Currency
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
wallet Namespace Reference

Namespaces

 DBKeys
 
 feebumper
 
 wallet_crypto_tests
 
 WalletTool
 

Classes

class  SafeDbt
 RAII class that automatically cleanses its data on destruction. More...
 
struct  WalletDatabaseFileId
 
class  BerkeleyEnvironment
 
class  BerkeleyDatabase
 An instance of this class represents one database. More...
 
class  BerkeleyCursor
 
class  BerkeleyBatch
 RAII class that provides access to a Berkeley database. More...
 
class  PreselectedInput
 
class  CCoinControl
 Coin Control Features. More...
 
class  MinOutputGroupComparator
 
struct  COutput
 A UTXO under consideration for use in funding a new transaction. More...
 
struct  CoinSelectionParams
 Parameters for one iteration of Coin Selection. More...
 
struct  CoinEligibilityFilter
 Parameters for filtering which OutputGroups we may use in coin selection. More...
 
struct  OutputGroup
 A group of UTXOs paid to the same output script. More...
 
struct  Groups
 
struct  OutputGroupTypeMap
 Stores several 'Groups' whose were mapped by output type. More...
 
struct  SelectionResult
 
struct  WalletContext
 WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets. More...
 
class  CMasterKey
 Private key encryption is done based on a CMasterKey, which holds a salt and random encryption key. More...
 
class  CCrypter
 Encryption/decryption context with key information. More...
 
struct  BytePrefix
 
class  DatabaseCursor
 
class  DatabaseBatch
 RAII class that provides access to a WalletDatabase. More...
 
class  WalletDatabase
 An instance of this class represents one database. More...
 
struct  DatabaseOptions
 
class  ExternalSignerScriptPubKeyMan
 
class  WalletInit
 
class  MetaPage
 Berkeley DB BTree metadata page layout. More...
 
class  RecordHeader
 General class for records in a BDB BTree database. More...
 
class  DataRecord
 Class for data in the record directly. More...
 
class  InternalRecord
 Class for records representing internal nodes of the BTree. More...
 
class  OverflowRecord
 Class for records representing overflow records of the BTree. More...
 
class  PageHeader
 A generic data page in the database. More...
 
class  RecordsPage
 A page of records in the database. More...
 
class  OverflowPage
 A page containing overflow data. More...
 
class  InternalPage
 A page of records in the database. More...
 
class  BerkeleyRODatabase
 A class representing a BerkeleyDB file from which we can only read records. More...
 
class  BerkeleyROCursor
 
class  BerkeleyROBatch
 RAII class that provides access to a BerkeleyRODatabase. More...
 
struct  COutputEntry
 
struct  Balance
 
class  DescribeWalletAddressVisitor
 
struct  ImportData
 
struct  tallyitem
 
class  DummyCursor
 
class  DummyBatch
 RAII class that provides access to a DummyDatabase. More...
 
class  DummyDatabase
 A dummy WalletDatabase that does nothing and never fails. More...
 
class  WalletStorage
 
class  CKeyPool
 A key from a CWallet's keypool. More...
 
struct  WalletDestination
 
class  ScriptPubKeyMan
 
class  LegacyDataSPKM
 
class  LegacyScriptPubKeyMan
 
class  LegacySigningProvider
 Wraps a LegacyScriptPubKeyMan so that it can be returned in a new unique_ptr. More...
 
class  DescriptorScriptPubKeyMan
 
struct  MigrationData
 struct containing information needed for migrating legacy wallets to descriptor wallets More...
 
struct  TxSize
 
struct  CoinsResult
 COutputs available for spending, stored by OutputType. More...
 
struct  CoinFilterParams
 
struct  SelectionFilter
 
struct  PreSelectedInputs
 
struct  CreatedTransactionResult
 
class  SQLiteCursor
 RAII class that provides a database cursor. More...
 
class  SQliteExecHandler
 Class responsible for executing SQL statements in SQLite databases. More...
 
class  SQLiteBatch
 RAII class that provides access to a WalletDatabase. More...
 
class  SQLiteDatabase
 An instance of this class represents one SQLite3 database. More...
 
class  GroupVerifier
 
struct  InitWalletDirTestingSetup
 
class  MockableCursor
 
class  MockableBatch
 
class  MockableDatabase
 A WalletDatabase whose contents and return values can be modified as needed for testing. More...
 
class  TestCrypter
 
struct  WalletTestingSetup
 Testing setup and teardown for wallet. More...
 
class  ListCoinsTestingSetup
 
class  DummyDescriptor
 
struct  TxStateConfirmed
 State of transaction confirmed in a block. More...
 
struct  TxStateInMempool
 State of transaction added to mempool. More...
 
struct  TxStateBlockConflicted
 State of rejected transaction that conflicts with a confirmed block. More...
 
struct  TxStateInactive
 State of transaction not confirmed or conflicting with a known block and not in the mempool. More...
 
struct  TxStateUnrecognized
 State of transaction loaded in an unrecognized state with unexpected hash or index values. More...
 
struct  CachableAmount
 Cachable amount subdivided into watchonly and spendable parts. More...
 
class  CMerkleTx
 Legacy class used for deserializing vtxPrev for backwards compatibility. More...
 
class  CWalletTx
 A transaction with a bunch of additional info that only the owner cares about. More...
 
struct  WalletTxOrderComparator
 
class  ReserveDestination
 A wrapper to reserve an address from a wallet. More...
 
struct  CAddressBookData
 Address book data. More...
 
struct  CRecipient
 
class  CWallet
 A CWallet maintains a set of transactions and balances, and provides the ability to create new transactions. More...
 
class  WalletRescanReserver
 RAII object to check and reserve a wallet rescan. More...
 
struct  MigrationResult
 
struct  LoadResult
 
class  CHDChain
 
class  CKeyMetadata
 
class  WalletBatch
 Access to the wallet database. More...
 
class  WalletDescriptor
 Descriptor with some wallet metadata. More...
 

Typedefs

using isminefilter = std::underlying_type< isminetype >::type
 used for bitflags of isminetype More...
 
typedef std::map< CoinEligibilityFilter, OutputGroupTypeMapFilteredOutputGroups
 
using LoadWalletFn = std::function< void(std::unique_ptr< interfaces::Wallet > wallet)>
 
typedef std::vector< unsigned char, secure_allocator< unsigned char > > CKeyingMaterial
 
using BerkeleyROData = std::map< SerializeData, SerializeData, std::less<> >
 
typedef std::pair< std::vector< unsigned char >, std::vector< unsigned char > > KeyValPair
 
typedef std::vector< unsigned char > valtype
 
typedef std::set< std::shared_ptr< COutput > > CoinSet
 
using MockableData = std::map< SerializeData, SerializeData, std::less<> >
 
using TxState = std::variant< TxStateConfirmed, TxStateInMempool, TxStateBlockConflicted, TxStateInactive, TxStateUnrecognized >
 All possible CWalletTx states. More...
 
using SyncTxState = std::variant< TxStateConfirmed, TxStateInMempool, TxStateInactive >
 Subset of states transaction sync logic is implemented to handle. More...
 
typedef std::map< std::string, std::string > mapValue_t
 
using LoadFunc = std::function< DBErrors(CWallet *pwallet, DataStream &key, DataStream &value, std::string &err)>
 

Enumerations

enum class  SelectionAlgorithm : uint8_t {
  BNB = 0 , KNAPSACK = 1 , SRD = 2 , CG = 3 ,
  MANUAL = 4
}
 
enum class  DatabaseFormat { BERKELEY , SQLITE , BERKELEY_RO , BERKELEY_SWAP }
 
enum class  DatabaseStatus {
  SUCCESS , FAILED_BAD_PATH , FAILED_BAD_FORMAT , FAILED_ALREADY_LOADED ,
  FAILED_ALREADY_EXISTS , FAILED_NOT_FOUND , FAILED_CREATE , FAILED_LOAD ,
  FAILED_VERIFY , FAILED_ENCRYPT , FAILED_INVALID_BACKUP_FILE
}
 
enum class  PageType : uint8_t { BTREE_INTERNAL = 3 , BTREE_LEAF = 5 , OVERFLOW_DATA = 7 , BTREE_META = 9 }
 
enum class  RecordType : uint8_t { KEYDATA = 1 , OVERFLOW_DATA = 3 , DELETE = 0x80 }
 
enum class  BTreeFlags : uint32_t { SUBDB = 0x20 }
 
enum class  ScriptContext { TOP , P2SH , WITNESS_V0 }
 
enum  isminetype : unsigned int {
  ISMINE_NO = 0 , ISMINE_WATCH_ONLY = 1 << 0 , ISMINE_SPENDABLE = 1 << 1 , ISMINE_USED = 1 << 2 ,
  ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE , ISMINE_ALL_USED = ISMINE_ALL | ISMINE_USED , ISMINE_ENUM_ELEMENTS
}
 IsMine() return codes, which depend on ScriptPubKeyMan implementation. More...
 
enum class  AddressPurpose { RECEIVE , SEND , REFUND }
 Address purpose field that has been been stored with wallet sending and receiving addresses since BIP70 payment protocol support was added in https://github.com/bitcoin/bitcoin/pull/2539. More...
 
enum class  DBErrors : int {
  LOAD_OK = 0 , NEED_RESCAN = 1 , NEED_REWRITE = 2 , EXTERNAL_SIGNER_SUPPORT_REQUIRED = 3 ,
  NONCRITICAL_ERROR = 4 , TOO_NEW = 5 , UNKNOWN_DESCRIPTOR = 6 , LOAD_FAIL = 7 ,
  UNEXPECTED_LEGACY_ENTRY = 8 , CORRUPT = 9
}
 Error statuses for the wallet database. More...
 
enum  WalletFeature {
  FEATURE_BASE = 10500 , FEATURE_WALLETCRYPT = 40000 , FEATURE_COMPRPUBKEY = 60000 , FEATURE_HD = 130000 ,
  FEATURE_HD_SPLIT = 139900 , FEATURE_NO_DEFAULT_KEY = 159900 , FEATURE_PRE_SPLIT_KEYPOOL = 169900 , FEATURE_LATEST = FEATURE_PRE_SPLIT_KEYPOOL
}
 (client) version numbers for particular wallet features More...
 
enum  WalletFlags : uint64_t {
  WALLET_FLAG_AVOID_REUSE = (1ULL << 0) , WALLET_FLAG_KEY_ORIGIN_METADATA = (1ULL << 1) , WALLET_FLAG_LAST_HARDENED_XPUB_CACHED = (1ULL << 2) , WALLET_FLAG_DISABLE_PRIVATE_KEYS = (1ULL << 32) ,
  WALLET_FLAG_BLANK_WALLET = (1ULL << 33) , WALLET_FLAG_DESCRIPTORS = (1ULL << 34) , WALLET_FLAG_EXTERNAL_SIGNER = (1ULL << 35)
}
 

Functions

static void WalletBalance (benchmark::Bench &bench, const bool set_dirty, const bool add_mine)
 
static void WalletBalanceDirty (benchmark::Bench &bench)
 
static void WalletBalanceClean (benchmark::Bench &bench)
 
static void WalletBalanceMine (benchmark::Bench &bench)
 
static void WalletBalanceWatch (benchmark::Bench &bench)
 
 BENCHMARK (WalletBalanceDirty, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (WalletBalanceClean, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (WalletBalanceMine, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (WalletBalanceWatch, benchmark::PriorityLevel::HIGH)
 
static void WalletCreate (benchmark::Bench &bench, bool encrypted)
 
static void WalletCreatePlain (benchmark::Bench &bench)
 
static void WalletCreateEncrypted (benchmark::Bench &bench)
 
static void WalletIsMine (benchmark::Bench &bench, bool legacy_wallet, int num_combo=0)
 
static void AddTx (CWallet &wallet)
 
static void WalletLoading (benchmark::Bench &bench, bool legacy_wallet)
 
std::shared_ptr< BerkeleyEnvironmentGetBerkeleyEnv (const fs::path &env_directory, bool use_shared_memory)
 Get BerkeleyEnvironment given a directory path. More...
 
static Span< const std::byte > SpanFromDbt (const SafeDbt &dbt)
 
bool BerkeleyDatabaseSanityCheck ()
 Perform sanity check of runtime BDB version versus linked BDB version. More...
 
std::string BerkeleyDatabaseVersion ()
 
std::unique_ptr< BerkeleyDatabaseMakeBerkeleyDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 Return object giving access to Berkeley database at specified path. More...
 
static util::Result< SelectionResultErrorMaxWeightExceeded ()
 
util::Result< SelectionResultSelectCoinsBnB (std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, const CAmount &cost_of_change, int max_selection_weight)
 
util::Result< SelectionResultCoinGrinder (std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, CAmount change_target, int max_selection_weight)
 
util::Result< SelectionResultSelectCoinsSRD (const std::vector< OutputGroup > &utxo_pool, CAmount target_value, CAmount change_fee, FastRandomContext &rng, int max_selection_weight)
 Select coins by Single Random Draw. More...
 
static void ApproximateBestSubset (FastRandomContext &insecure_rand, const std::vector< OutputGroup > &groups, const CAmount &nTotalLower, const CAmount &nTargetValue, std::vector< char > &vfBest, CAmount &nBest, int max_selection_weight, int iterations=1000)
 Find a subset of the OutputGroups that is at least as large as, but as close as possible to, the target amount; solve subset sum. More...
 
util::Result< SelectionResultKnapsackSolver (std::vector< OutputGroup > &groups, const CAmount &nTargetValue, CAmount change_target, FastRandomContext &rng, int max_selection_weight)
 
CAmount GenerateChangeTarget (const CAmount payment_value, const CAmount change_fee, FastRandomContext &rng)
 Choose a random change target for each transaction to make it harder to fingerprint the Core wallet based on the change output values of transactions it creates. More...
 
std::string GetAlgorithmName (const SelectionAlgorithm algo)
 
bool EncryptSecret (const CKeyingMaterial &vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256 &nIV, std::vector< unsigned char > &vchCiphertext)
 
bool DecryptSecret (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCiphertext, const uint256 &nIV, CKeyingMaterial &vchPlaintext)
 
bool DecryptKey (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCryptedSecret, const CPubKey &vchPubKey, CKey &key)
 
bool operator< (BytePrefix a, Span< const std::byte > b)
 
bool operator< (Span< const std::byte > a, BytePrefix b)
 
std::vector< fs::pathListDatabases (const fs::path &path)
 Recursively list database paths in directory. More...
 
fs::path BDBDataFile (const fs::path &wallet_path)
 
fs::path SQLiteDataFile (const fs::path &path)
 
bool IsBDBFile (const fs::path &path)
 
bool IsSQLiteFile (const fs::path &path)
 
void ReadDatabaseArgs (const ArgsManager &args, DatabaseOptions &options)
 
std::unique_ptr< WalletDatabaseMakeDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 
bool DumpWallet (const ArgsManager &args, WalletDatabase &db, bilingual_str &error)
 
static void WalletToolReleaseWallet (CWallet *wallet)
 
bool CreateFromDump (const ArgsManager &args, const std::string &name, const fs::path &wallet_path, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
static feebumper::Result PreconditionChecks (const CWallet &wallet, const CWalletTx &wtx, bool require_mine, std::vector< bilingual_str > &errors) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Check whether transaction has descendant in wallet or mempool, or has been mined, or conflicts with a mined transaction. More...
 
static feebumper::Result CheckFeeRate (const CWallet &wallet, const CMutableTransaction &mtx, const CFeeRate &newFeerate, const int64_t maxTxSize, CAmount old_fee, std::vector< bilingual_str > &errors)
 Check if the user provided a valid feeRate. More...
 
static CFeeRate EstimateFeeRate (const CWallet &wallet, const CWalletTx &wtx, const CAmount old_fee, const CCoinControl &coin_control)
 
CAmount GetRequiredFee (const CWallet &wallet, unsigned int nTxBytes)
 Return the minimum required absolute fee for this size based on the required fee rate. More...
 
CAmount GetMinimumFee (const CWallet &wallet, unsigned int nTxBytes, const CCoinControl &coin_control, FeeCalculation *feeCalc)
 Estimate the minimum fee considering user set parameters and the required fee. More...
 
CFeeRate GetRequiredFeeRate (const CWallet &wallet)
 Return the minimum required feerate taking into account the minimum relay feerate and user set minimum transaction feerate. More...
 
CFeeRate GetMinimumFeeRate (const CWallet &wallet, const CCoinControl &coin_control, FeeCalculation *feeCalc)
 Estimate the minimum fee rate considering user set parameters and the required fee. More...
 
CFeeRate GetDiscardRate (const CWallet &wallet)
 Return the maximum feerate for discarding change. More...
 
bool VerifyWallets (WalletContext &context)
 Responsible for reading and validating the -wallet arguments and verifying the wallet database. More...
 
bool LoadWallets (WalletContext &context)
 Load wallet databases. More...
 
void StartWallets (WalletContext &context)
 Complete startup of wallets. More...
 
void FlushWallets (WalletContext &context)
 Flush all wallets in preparation for shutdown. More...
 
void StopWallets (WalletContext &context)
 Stop all wallets. Wallets will be flushed first. More...
 
void UnloadWallets (WalletContext &context)
 Close all wallets. More...
 
static void SeekToPage (AutoFile &s, uint32_t page_num, uint32_t page_size)
 
std::unique_ptr< BerkeleyRODatabaseMakeBerkeleyRODatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 Return object giving access to Berkeley Read Only database at specified path. More...
 
isminetype InputIsMine (const CWallet &wallet, const CTxIn &txin)
 
bool AllInputsMine (const CWallet &wallet, const CTransaction &tx, const isminefilter &filter)
 Returns whether all of the inputs match the filter. More...
 
CAmount OutputGetCredit (const CWallet &wallet, const CTxOut &txout, const isminefilter &filter)
 
CAmount TxGetCredit (const CWallet &wallet, const CTransaction &tx, const isminefilter &filter)
 
bool ScriptIsChange (const CWallet &wallet, const CScript &script)
 
bool OutputIsChange (const CWallet &wallet, const CTxOut &txout)
 
CAmount OutputGetChange (const CWallet &wallet, const CTxOut &txout)
 
CAmount TxGetChange (const CWallet &wallet, const CTransaction &tx)
 
static CAmount GetCachableAmount (const CWallet &wallet, const CWalletTx &wtx, CWalletTx::AmountType type, const isminefilter &filter)
 
CAmount CachedTxGetCredit (const CWallet &wallet, const CWalletTx &wtx, const isminefilter &filter)
 
CAmount CachedTxGetDebit (const CWallet &wallet, const CWalletTx &wtx, const isminefilter &filter)
 filter decides which addresses will count towards the debit More...
 
CAmount CachedTxGetChange (const CWallet &wallet, const CWalletTx &wtx)
 
CAmount CachedTxGetImmatureCredit (const CWallet &wallet, const CWalletTx &wtx, const isminefilter &filter)
 
CAmount CachedTxGetAvailableCredit (const CWallet &wallet, const CWalletTx &wtx, const isminefilter &filter)
 
void CachedTxGetAmounts (const CWallet &wallet, const CWalletTx &wtx, std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, const isminefilter &filter, bool include_change)
 
bool CachedTxIsFromMe (const CWallet &wallet, const CWalletTx &wtx, const isminefilter &filter)
 
bool CachedTxIsTrusted (const CWallet &wallet, const CWalletTx &wtx, std::set< uint256 > &trusted_parents)
 
bool CachedTxIsTrusted (const CWallet &wallet, const CWalletTx &wtx)
 
Balance GetBalance (const CWallet &wallet, const int min_depth, bool avoid_reuse)
 
std::map< CTxDestination, CAmountGetAddressBalances (const CWallet &wallet)
 
std::set< std::set< CTxDestination > > GetAddressGroupings (const CWallet &wallet)
 
RPCHelpMan getnewaddress ()
 
RPCHelpMan getrawchangeaddress ()
 
RPCHelpMan setlabel ()
 
RPCHelpMan listaddressgroupings ()
 
RPCHelpMan addmultisigaddress ()
 
RPCHelpMan keypoolrefill ()
 
RPCHelpMan newkeypool ()
 
static UniValue DescribeWalletAddress (const CWallet &wallet, const CTxDestination &dest)
 
RPCHelpMan getaddressinfo ()
 
RPCHelpMan getaddressesbylabel ()
 
RPCHelpMan listlabels ()
 
RPCHelpMan walletdisplayaddress ()
 
static std::string EncodeDumpString (const std::string &str)
 
static std::string DecodeDumpString (const std::string &str)
 
static bool GetWalletAddressesForKey (const LegacyScriptPubKeyMan *spk_man, const CWallet &wallet, const CKeyID &keyid, std::string &strAddr, std::string &strLabel) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
static void RescanWallet (CWallet &wallet, const WalletRescanReserver &reserver, int64_t time_begin=TIMESTAMP_MIN, bool update=true)
 
static void EnsureBlockDataFromTime (const CWallet &wallet, int64_t timestamp)
 
RPCHelpMan importprivkey ()
 
RPCHelpMan importaddress ()
 
RPCHelpMan importprunedfunds ()
 
RPCHelpMan removeprunedfunds ()
 
RPCHelpMan importpubkey ()
 
RPCHelpMan importwallet ()
 
RPCHelpMan dumpprivkey ()
 
RPCHelpMan dumpwallet ()
 
static std::string RecurseImportData (const CScript &script, ImportData &import_data, const ScriptContext script_ctx)
 
static UniValue ProcessImportLegacy (ImportData &import_data, std::map< CKeyID, CPubKey > &pubkey_map, std::map< CKeyID, CKey > &privkey_map, std::set< CScript > &script_pub_keys, bool &have_solving_data, const UniValue &data, std::vector< CKeyID > &ordered_pubkeys)
 
static UniValue ProcessImportDescriptor (ImportData &import_data, std::map< CKeyID, CPubKey > &pubkey_map, std::map< CKeyID, CKey > &privkey_map, std::set< CScript > &script_pub_keys, bool &have_solving_data, const UniValue &data, std::vector< CKeyID > &ordered_pubkeys)
 
static UniValue ProcessImport (CWallet &wallet, const UniValue &data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
static int64_t GetImportTimestamp (const UniValue &data, int64_t now)
 
RPCHelpMan importmulti ()
 
static UniValue ProcessDescriptorImport (CWallet &wallet, const UniValue &data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
RPCHelpMan importdescriptors ()
 
RPCHelpMan listdescriptors ()
 
RPCHelpMan backupwallet ()
 
RPCHelpMan restorewallet ()
 
static CAmount GetReceived (const CWallet &wallet, const UniValue &params, bool by_label) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
RPCHelpMan getreceivedbyaddress ()
 
RPCHelpMan getreceivedbylabel ()
 
RPCHelpMan getbalance ()
 
RPCHelpMan getunconfirmedbalance ()
 
RPCHelpMan lockunspent ()
 
RPCHelpMan listlockunspent ()
 
RPCHelpMan getbalances ()
 
RPCHelpMan listunspent ()
 
RPCHelpMan walletpassphrase ()
 
RPCHelpMan walletpassphrasechange ()
 
RPCHelpMan walletlock ()
 
RPCHelpMan encryptwallet ()
 
RPCHelpMan signmessage ()
 
std::vector< CRecipientCreateRecipients (const std::vector< std::pair< CTxDestination, CAmount >> &outputs, const std::set< int > &subtract_fee_outputs)
 
static void InterpretFeeEstimationInstructions (const UniValue &conf_target, const UniValue &estimate_mode, const UniValue &fee_rate, UniValue &options)
 
std::set< int > InterpretSubtractFeeFromOutputInstructions (const UniValue &sffo_instructions, const std::vector< std::string > &destinations)
 
static UniValue FinishTransaction (const std::shared_ptr< CWallet > pwallet, const UniValue &options, const CMutableTransaction &rawTx)
 
static void PreventOutdatedOptions (const UniValue &options)
 
UniValue SendMoney (CWallet &wallet, const CCoinControl &coin_control, std::vector< CRecipient > &recipients, mapValue_t map_value, bool verbose)
 
static void SetFeeEstimateMode (const CWallet &wallet, CCoinControl &cc, const UniValue &conf_target, const UniValue &estimate_mode, const UniValue &fee_rate, bool override_min_fee)
 Update coin control with fee estimation based on the given parameters. More...
 
RPCHelpMan sendtoaddress ()
 
RPCHelpMan sendmany ()
 
RPCHelpMan settxfee ()
 
static std::vector< RPCArgFundTxDoc (bool solving_data=true)
 
CreatedTransactionResult FundTransaction (CWallet &wallet, const CMutableTransaction &tx, const std::vector< CRecipient > &recipients, const UniValue &options, CCoinControl &coinControl, bool override_min_fee)
 
static void SetOptionsInputWeights (const UniValue &inputs, UniValue &options)
 
RPCHelpMan fundrawtransaction ()
 
RPCHelpMan signrawtransactionwithwallet ()
 
static std::vector< RPCArgOutputsDoc ()
 
static RPCHelpMan bumpfee_helper (std::string method_name)
 
RPCHelpMan bumpfee ()
 
RPCHelpMan psbtbumpfee ()
 
RPCHelpMan send ()
 
RPCHelpMan sendall ()
 
RPCHelpMan walletprocesspsbt ()
 
RPCHelpMan walletcreatefundedpsbt ()
 
static void WalletTxToJSON (const CWallet &wallet, const CWalletTx &wtx, UniValue &entry) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
static UniValue ListReceived (const CWallet &wallet, const UniValue &params, const bool by_label, const bool include_immature_coinbase) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
RPCHelpMan listreceivedbyaddress ()
 
RPCHelpMan listreceivedbylabel ()
 
static void MaybePushAddress (UniValue &entry, const CTxDestination &dest)
 
template<class Vec >
static void ListTransactions (const CWallet &wallet, const CWalletTx &wtx, int nMinDepth, bool fLong, Vec &ret, const isminefilter &filter_ismine, const std::optional< std::string > &filter_label, bool include_change=false) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 List transactions based on the given criteria. More...
 
static std::vector< RPCResultTransactionDescriptionString ()
 
RPCHelpMan listtransactions ()
 
RPCHelpMan listsinceblock ()
 
RPCHelpMan gettransaction ()
 
RPCHelpMan abandontransaction ()
 
RPCHelpMan rescanblockchain ()
 
RPCHelpMan abortrescan ()
 
int64_t ParseISO8601DateTime (const std::string &str)
 
bool GetAvoidReuseFlag (const CWallet &wallet, const UniValue &param)
 
bool ParseIncludeWatchonly (const UniValue &include_watchonly, const CWallet &wallet)
 Used by RPC commands that have an include_watchonly parameter. More...
 
bool GetWalletNameFromJSONRPCRequest (const JSONRPCRequest &request, std::string &wallet_name)
 
std::shared_ptr< CWalletGetWalletForJSONRPCRequest (const JSONRPCRequest &request)
 Figures out what wallet, if any, to use for a JSONRPCRequest. More...
 
void EnsureWalletIsUnlocked (const CWallet &wallet)
 
WalletContextEnsureWalletContext (const std::any &context)
 
LegacyScriptPubKeyManEnsureLegacyScriptPubKeyMan (CWallet &wallet, bool also_create)
 
const LegacyScriptPubKeyManEnsureConstLegacyScriptPubKeyMan (const CWallet &wallet)
 
std::string LabelFromValue (const UniValue &value)
 
void PushParentDescriptors (const CWallet &wallet, const CScript &script_pubkey, UniValue &entry)
 Fetch parent descriptors of this scriptPubKey. More...
 
void HandleWalletError (const std::shared_ptr< CWallet > wallet, DatabaseStatus &status, bilingual_str &error)
 
void AppendLastProcessedBlock (UniValue &entry, const CWallet &wallet)
 
bool HaveKey (const SigningProvider &wallet, const CKey &key)
 Checks if a CKey is in the given CWallet compressed or otherwise. More...
 
static RPCHelpMan getwalletinfo ()
 
static RPCHelpMan listwalletdir ()
 
static RPCHelpMan listwallets ()
 
static RPCHelpMan loadwallet ()
 
static RPCHelpMan setwalletflag ()
 
static RPCHelpMan createwallet ()
 
static RPCHelpMan unloadwallet ()
 
static RPCHelpMan sethdseed ()
 
static RPCHelpMan upgradewallet ()
 
RPCHelpMan simulaterawtransaction ()
 
static RPCHelpMan migratewallet ()
 
RPCHelpMan gethdkeys ()
 
static RPCHelpMan createwalletdescriptor ()
 
Span< const CRPCCommandGetWalletRPCCommands ()
 
bool RecoverDatabaseFile (const ArgsManager &args, const fs::path &file_path, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
static int64_t GetOldestKeyTimeInPool (const std::set< int64_t > &setKeyPool, WalletBatch &batch)
 
static bool ExtractPubKey (const CScript &dest, CPubKey &pubKeyOut)
 
static void DeriveExtKey (CExtKey &key_in, unsigned int index, CExtKey &key_out)
 Try to derive an extended key, throw if it fails. More...
 
std::vector< CKeyIDGetAffectedKeys (const CScript &spk, const SigningProvider &provider)
 
static bool IsSegwit (const Descriptor &desc)
 Whether the descriptor represents, directly or not, a witness program. More...
 
static bool UseMaxSig (const std::optional< CTxIn > &txin, const CCoinControl *coin_control)
 Whether to assume ECDSA signatures' will be high-r. More...
 
static std::optional< int64_t > MaxInputWeight (const Descriptor &desc, const std::optional< CTxIn > &txin, const CCoinControl *coin_control, const bool tx_is_segwit, const bool can_grind_r)
 Get the size of an input (in witness units) once it's signed. More...
 
int CalculateMaximumSignedInputSize (const CTxOut &txout, const COutPoint outpoint, const SigningProvider *provider, bool can_grind_r, const CCoinControl *coin_control)
 
int CalculateMaximumSignedInputSize (const CTxOut &txout, const CWallet *pwallet, const CCoinControl *coin_control)
 Get the marginal bytes if spending the specified output from this transaction. More...
 
static std::unique_ptr< DescriptorGetDescriptor (const CWallet *wallet, const CCoinControl *coin_control, const CScript script_pubkey)
 Infer a descriptor for the given output script. More...
 
static std::optional< int64_t > GetSignedTxinWeight (const CWallet *wallet, const CCoinControl *coin_control, const CTxIn &txin, const CTxOut &txo, const bool tx_is_segwit, const bool can_grind_r)
 Infer the maximum size of this input after it will be signed. More...
 
TxSize CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, const std::vector< CTxOut > &txouts, const CCoinControl *coin_control=nullptr)
 Calculate the size of the transaction using CoinControl to determine whether to expect signature grinding when calculating the size of the input spend. More...
 
TxSize CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, const CCoinControl *coin_control)
 
static OutputType GetOutputType (TxoutType type, bool is_from_p2sh)
 
util::Result< PreSelectedInputsFetchSelectedInputs (const CWallet &wallet, const CCoinControl &coin_control, const CoinSelectionParams &coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Fetch and validate coin control selected inputs. More...
 
CoinsResult AvailableCoins (const CWallet &wallet, const CCoinControl *coinControl=nullptr, std::optional< CFeeRate > feerate=std::nullopt, const CoinFilterParams &params={}) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType. More...
 
CoinsResult AvailableCoinsListUnspent (const CWallet &wallet, const CCoinControl *coinControl=nullptr, CoinFilterParams params={}) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Wrapper function for AvailableCoins which skips the feerate and CoinFilterParams::only_spendable parameters. More...
 
const CTxOutFindNonChangeParentOutput (const CWallet &wallet, const COutPoint &outpoint) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Find non-change parent output. More...
 
std::map< CTxDestination, std::vector< COutput > > ListCoins (const CWallet &wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Return list of available coins and locked coins grouped by non-change output address. More...
 
FilteredOutputGroups GroupOutputs (const CWallet &wallet, const CoinsResult &coins, const CoinSelectionParams &coin_sel_params, const std::vector< SelectionFilter > &filters, std::vector< OutputGroup > &ret_discarded_groups)
 
FilteredOutputGroups GroupOutputs (const CWallet &wallet, const CoinsResult &coins, const CoinSelectionParams &coin_sel_params, const std::vector< SelectionFilter > &filters)
 Group coins by the provided filters. More...
 
static bool HasErrorMsg (const util::Result< SelectionResult > &res)
 
util::Result< SelectionResultAttemptSelection (interfaces::Chain &chain, const CAmount &nTargetValue, OutputGroupTypeMap &groups, const CoinSelectionParams &coin_selection_params, bool allow_mixed_output_types)
 Attempt to find a valid input set that preserves privacy by not mixing OutputTypes. More...
 
util::Result< SelectionResultChooseSelectionResult (interfaces::Chain &chain, const CAmount &nTargetValue, Groups &groups, const CoinSelectionParams &coin_selection_params)
 Attempt to find a valid input set that meets the provided eligibility filter and target. More...
 
util::Result< SelectionResultSelectCoins (const CWallet &wallet, CoinsResult &available_coins, const PreSelectedInputs &pre_set_inputs, const CAmount &nTargetValue, const CCoinControl &coin_control, const CoinSelectionParams &coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Select all coins from coin_control, and if coin_control 'm_allow_other_inputs=true', call 'AutomaticCoinSelection' to select a set of coins such that nTargetValue - pre_set_inputs.total_amount is met. More...
 
util::Result< SelectionResultAutomaticCoinSelection (const CWallet &wallet, CoinsResult &available_coins, const CAmount &nTargetValue, const CoinSelectionParams &coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Select a set of coins such that nTargetValue is met; never select unconfirmed coins if they are not ours param@[in] wallet The wallet which provides data necessary to spend the selected coins param@[in] available_coins The struct of coins, organized by OutputType, available for selection prior to filtering param@[in] nTargetValue The target value param@[in] coin_selection_params Parameters for this coin selection such as feerates, whether to avoid partial spends, and whether to subtract the fee from the outputs. More...
 
static bool IsCurrentForAntiFeeSniping (interfaces::Chain &chain, const uint256 &block_hash)
 
static void DiscourageFeeSniping (CMutableTransaction &tx, FastRandomContext &rng_fast, interfaces::Chain &chain, const uint256 &block_hash, int block_height)
 Set a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain. More...
 
size_t GetSerializeSizeForRecipient (const CRecipient &recipient)
 
bool IsDust (const CRecipient &recipient, const CFeeRate &dustRelayFee)
 
static util::Result< CreatedTransactionResultCreateTransactionInternal (CWallet &wallet, const std::vector< CRecipient > &vecSend, std::optional< unsigned int > change_pos, const CCoinControl &coin_control, bool sign) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
util::Result< CreatedTransactionResultCreateTransaction (CWallet &wallet, const std::vector< CRecipient > &vecSend, std::optional< unsigned int > change_pos, const CCoinControl &coin_control, bool sign=true)
 Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More...
 
util::Result< CreatedTransactionResultFundTransaction (CWallet &wallet, const CMutableTransaction &tx, const std::vector< CRecipient > &recipients, std::optional< unsigned int > change_pos, bool lockUnspents, CCoinControl)
 Insert additional inputs into the transaction by calling CreateTransaction();. More...
 
static Span< const std::byte > SpanFromBlob (sqlite3_stmt *stmt, int col)
 
static void ErrorLogCallback (void *arg, int code, const char *msg)
 
static int TraceSqlCallback (unsigned code, void *context, void *param1, void *param2)
 
static bool BindBlobToStatement (sqlite3_stmt *stmt, int index, Span< const std::byte > blob, const std::string &description)
 
static std::optional< int > ReadPragmaInteger (sqlite3 *db, const std::string &key, const std::string &description, bilingual_str &error)
 
static void SetPragma (sqlite3 *db, const std::string &key, const std::string &value, const std::string &err_msg)
 
std::unique_ptr< SQLiteDatabaseMakeSQLiteDatabase (const fs::path &path, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error)
 
std::string SQLiteDatabaseVersion ()
 
static void add_coin (const CAmount &nValue, int nInput, std::vector< COutput > &set)
 
static void add_coin (const CAmount &nValue, int nInput, SelectionResult &result)
 
static void add_coin (const CAmount &nValue, int nInput, SelectionResult &result, CAmount fee, CAmount long_term_fee)
 
static void add_coin (CoinsResult &available_coins, CWallet &wallet, const CAmount &nValue, CFeeRate feerate=CFeeRate(0), int nAge=6 *24, bool fIsFromMe=false, int nInput=0, bool spendable=false, int custom_size=0)
 
std::optional< SelectionResultKnapsackSolver (std::vector< OutputGroup > &groups, const CAmount &nTargetValue, CAmount change_target, FastRandomContext &rng)
 
std::optional< SelectionResultSelectCoinsBnB (std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, const CAmount &cost_of_change)
 
static bool EquivalentResult (const SelectionResult &a, const SelectionResult &b)
 Check if SelectionResult a is equivalent to SelectionResult b. More...
 
static bool EqualResult (const SelectionResult &a, const SelectionResult &b)
 Check if this selection is equal to another one. More...
 
static CAmount make_hard_case (int utxos, std::vector< COutput > &utxo_pool)
 
std::vector< OutputGroup > & GroupCoins (const std::vector< COutput > &available_coins, bool subtract_fee_outputs=false)
 
std::vector< OutputGroup > & KnapsackGroupOutputs (const CoinsResult &available_coins, CWallet &wallet, const CoinEligibilityFilter &filter)
 
static std::unique_ptr< CWalletNewWallet (const node::NodeContext &m_node, const std::string &wallet_name="")
 
 BOOST_AUTO_TEST_CASE (bnb_search_test)
 
 BOOST_AUTO_TEST_CASE (bnb_sffo_restriction)
 
 BOOST_AUTO_TEST_CASE (knapsack_solver_test)
 
 BOOST_AUTO_TEST_CASE (ApproximateBestSubset)
 
 BOOST_AUTO_TEST_CASE (SelectCoins_test)
 
 BOOST_AUTO_TEST_CASE (waste_test)
 
 BOOST_AUTO_TEST_CASE (bump_fee_test)
 
 BOOST_AUTO_TEST_CASE (effective_value_test)
 
static util::Result< SelectionResultCoinGrinder (const CAmount &target, const CoinSelectionParams &cs_params, const node::NodeContext &m_node, int max_selection_weight, std::function< CoinsResult(CWallet &)> coin_setup)
 
 BOOST_AUTO_TEST_CASE (coin_grinder_tests)
 
static util::Result< SelectionResultSelectCoinsSRD (const CAmount &target, const CoinSelectionParams &cs_params, const node::NodeContext &m_node, int max_selection_weight, std::function< CoinsResult(CWallet &)> coin_setup)
 
 BOOST_AUTO_TEST_CASE (srd_tests)
 
static util::Result< SelectionResultselect_coins (const CAmount &target, const CoinSelectionParams &cs_params, const CCoinControl &cc, std::function< CoinsResult(CWallet &)> coin_setup, const node::NodeContext &m_node)
 
static bool has_coin (const CoinSet &set, CAmount amount)
 
 BOOST_AUTO_TEST_CASE (check_max_selection_weight)
 
 BOOST_AUTO_TEST_CASE (SelectCoins_effective_value_test)
 
 BOOST_FIXTURE_TEST_CASE (wallet_coinsresult_test, BasicTestingSetup)
 
static Span< const std::byte > StringBytes (std::string_view str)
 
static SerializeData StringData (std::string_view str)
 
static void CheckPrefix (DatabaseBatch &batch, Span< const std::byte > prefix, MockableData expected)
 
static std::shared_ptr< BerkeleyEnvironmentGetWalletEnv (const fs::path &path, fs::path &database_filename)
 
 BOOST_AUTO_TEST_CASE (getwalletenv_file)
 
 BOOST_AUTO_TEST_CASE (getwalletenv_directory)
 
 BOOST_AUTO_TEST_CASE (getwalletenv_g_dbenvs_multiple)
 
 BOOST_AUTO_TEST_CASE (getwalletenv_g_dbenvs_free_instance)
 
static std::vector< std::unique_ptr< WalletDatabase > > TestDatabases (const fs::path &path_root)
 
 BOOST_AUTO_TEST_CASE (db_cursor_prefix_range_test)
 
 BOOST_AUTO_TEST_CASE (db_cursor_prefix_byte_test)
 
 BOOST_AUTO_TEST_CASE (db_availability_after_write_error)
 
 BOOST_AUTO_TEST_CASE (erase_prefix)
 
static void AddCoin (const CAmount &value, int n_input, int n_input_bytes, int locktime, std::vector< COutput > &coins, CFeeRate fee_rate)
 
static void GroupCoins (FuzzedDataProvider &fuzzed_data_provider, const std::vector< COutput > &coins, const CoinSelectionParams &coin_params, bool positive_only, std::vector< OutputGroup > &output_groups)
 
static CAmount CreateCoins (FuzzedDataProvider &fuzzed_data_provider, std::vector< COutput > &utxo_pool, CoinSelectionParams &coin_params, int &next_locktime)
 
static SelectionResult ManualSelection (std::vector< COutput > &utxos, const CAmount &total_amount, const bool &subtract_fee_outputs)
 
static bool HasErrorMsg (const util::Result< SelectionResult > &res)
 
 FUZZ_TARGET (coin_grinder)
 
 FUZZ_TARGET (coin_grinder_is_optimal)
 
 FUZZ_TARGET (coinselection)
 
static std::shared_ptr< CWalletNewWallet (const node::NodeContext &m_node)
 
static void addCoin (CoinsResult &coins, CWallet &wallet, const CTxDestination &dest, const CAmount &nValue, bool is_from_me, CFeeRate fee_rate=CFeeRate(0), int depth=6)
 
CoinSelectionParams makeSelectionParams (FastRandomContext &rand, bool avoid_partial_spends)
 
 BOOST_AUTO_TEST_CASE (outputs_grouping_tests)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_default)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_custom)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_does_not_exist)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_is_not_directory)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_is_not_relative)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_no_trailing)
 
 BOOST_AUTO_TEST_CASE (walletinit_verify_walletdir_no_trailing2)
 
wallet::ScriptPubKeyManCreateDescriptor (CWallet &keystore, const std::string &desc_str, const bool success)
 
 BOOST_AUTO_TEST_CASE (ismine_standard)
 
static void import_descriptor (CWallet &wallet, const std::string &descriptor) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
 BOOST_AUTO_TEST_CASE (psbt_updater_test)
 
 BOOST_AUTO_TEST_CASE (parse_hd_keypath)
 
 BOOST_AUTO_TEST_CASE (util_ParseISO8601DateTime)
 
 BOOST_AUTO_TEST_CASE (CanProvide)
 
 BOOST_FIXTURE_TEST_CASE (SubtractFee, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (wallet_duplicated_preset_inputs_test, TestChain100Setup)
 
std::unique_ptr< CWalletCreateSyncedWallet (interfaces::Chain &chain, CChain &cchain, const CKey &key)
 
std::shared_ptr< CWalletTestLoadWallet (std::unique_ptr< WalletDatabase > database, WalletContext &context, uint64_t create_flags)
 
std::shared_ptr< CWalletTestLoadWallet (WalletContext &context)
 
void TestUnloadWallet (std::shared_ptr< CWallet > &&wallet)
 
std::unique_ptr< WalletDatabaseDuplicateMockDatabase (WalletDatabase &database)
 
std::string getnewaddress (CWallet &w)
 Returns a new encoded destination from the wallet (hardcoded to BECH32) More...
 
CTxDestination getNewDestination (CWallet &w, OutputType output_type)
 Returns a new destination, of an specific type, from the wallet. More...
 
std::unique_ptr< WalletDatabaseCreateMockableWalletDatabase (MockableData records)
 
MockableDatabaseGetMockableDatabase (CWallet &wallet)
 
 BOOST_AUTO_TEST_CASE (passphrase)
 
 BOOST_AUTO_TEST_CASE (encrypt)
 
 BOOST_AUTO_TEST_CASE (decrypt)
 
static CMutableTransaction TestSimpleSpend (const CTransaction &from, uint32_t index, const CKey &key, const CScript &pubkey)
 
static void AddKey (CWallet &wallet, const CKey &key)
 
 BOOST_FIXTURE_TEST_CASE (scan_for_wallet_transactions, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (importmulti_rescan, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (importwallet_rescan, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (coin_mark_dirty_immature_credit, TestChain100Setup)
 
static int64_t AddTx (ChainstateManager &chainman, CWallet &wallet, uint32_t lockTime, int64_t mockTime, int64_t blockTime)
 
 BOOST_AUTO_TEST_CASE (ComputeTimeSmart)
 
void TestLoadWallet (const std::string &name, DatabaseFormat format, std::function< void(std::shared_ptr< CWallet >)> f)
 
 BOOST_FIXTURE_TEST_CASE (LoadReceiveRequests, TestingSetup)
 
static void TestWatchOnlyPubKey (LegacyScriptPubKeyMan *spk_man, const CPubKey &add_pubkey)
 
static void PollutePubKey (CPubKey &pubkey)
 
 BOOST_AUTO_TEST_CASE (WatchOnlyPubKeys)
 
 BOOST_FIXTURE_TEST_CASE (ListCoinsTest, ListCoinsTestingSetup)
 
void TestCoinsResult (ListCoinsTest &context, OutputType out_type, CAmount amount, std::map< OutputType, size_t > &expected_coins_sizes)
 
 BOOST_FIXTURE_TEST_CASE (BasicOutputTypesTest, ListCoinsTest)
 
 BOOST_FIXTURE_TEST_CASE (wallet_disableprivkeys, TestChain100Setup)
 
static size_t CalculateNestedKeyhashInputSize (bool use_max_sig)
 
 BOOST_FIXTURE_TEST_CASE (dummy_input_size_test, TestChain100Setup)
 
bool malformed_descriptor (std::ios_base::failure e)
 
 BOOST_FIXTURE_TEST_CASE (wallet_descriptor_test, BasicTestingSetup)
 
 BOOST_FIXTURE_TEST_CASE (CreateWallet, TestChain100Setup)
 Test CWallet::Create() and its behavior handling potential race conditions if it's called the same time an incoming transaction shows up in the mempool or a new block. More...
 
 BOOST_FIXTURE_TEST_CASE (CreateWalletWithoutChain, BasicTestingSetup)
 
 BOOST_FIXTURE_TEST_CASE (RemoveTxs, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (wallet_sync_tx_invalid_state_test, TestingSetup)
 Checks a wallet invalid state where the inputs (prev-txs) of a new arriving transaction are not marked dirty, while the transaction that spends them exist inside the in-memory wallet tx map (not stored on db due a db write failure). More...
 
 BOOST_AUTO_TEST_CASE (roundtrip)
 
 BOOST_AUTO_TEST_CASE (walletdb_readkeyvalue)
 
 BOOST_AUTO_TEST_CASE (walletdb_read_write_deadlock)
 
 BOOST_FIXTURE_TEST_CASE (wallet_load_descriptors, TestingSetup)
 
bool HasAnyRecordOfType (WalletDatabase &db, const std::string &key)
 
template<typename... Args>
SerializeData MakeSerializeData (const Args &... args)
 
 BOOST_FIXTURE_TEST_CASE (wallet_load_ckey, TestingSetup)
 
static TxState TxStateInterpretSerialized (TxStateUnrecognized data)
 Try to interpret deserialized TxStateUnrecognized data as a recognized state. More...
 
static uint256 TxStateSerializedBlockHash (const TxState &state)
 Get TxState serialized block hash. Inverse of TxStateInterpretSerialized. More...
 
static int TxStateSerializedIndex (const TxState &state)
 Get TxState serialized block index. Inverse of TxStateInterpretSerialized. More...
 
template<typename T >
std::string TxStateString (const T &state)
 Return TxState or SyncTxState as a string for logging or debugging. More...
 
bool AddWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Add wallet name to persistent configuration so it will be loaded on startup. More...
 
bool RemoveWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Remove wallet name from persistent configuration so it will not be loaded on startup. More...
 
static void UpdateWalletSetting (interfaces::Chain &chain, const std::string &wallet_name, std::optional< bool > load_on_startup, std::vector< bilingual_str > &warnings)
 
static void RefreshMempoolStatus (CWalletTx &tx, interfaces::Chain &chain)
 Refresh mempool status so the wallet is in an internally consistent state and immediately knows the transaction's status: Whether it can be considered trusted and is eligible to be abandoned ... More...
 
bool AddWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet)
 
bool RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
 
bool RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start)
 
std::vector< std::shared_ptr< CWallet > > GetWallets (WalletContext &context)
 
std::shared_ptr< CWalletGetDefaultWallet (WalletContext &context, size_t &count)
 
std::shared_ptr< CWalletGetWallet (WalletContext &context, const std::string &name)
 
std::unique_ptr< interfaces::HandlerHandleLoadWallet (WalletContext &context, LoadWalletFn load_wallet)
 
void NotifyWalletLoaded (WalletContext &context, const std::shared_ptr< CWallet > &wallet)
 
static std::set< std::string > g_loading_wallet_set GUARDED_BY (g_loading_wallet_mutex)
 
static std::set< std::string > g_unloading_wallet_set GUARDED_BY (g_wallet_release_mutex)
 
static void ReleaseWallet (CWallet *wallet)
 
void UnloadWallet (std::shared_ptr< CWallet > &&wallet)
 Explicitly unload and delete the wallet. More...
 
std::shared_ptr< CWalletLoadWallet (WalletContext &context, const std::string &name, std::optional< bool > load_on_start, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
std::shared_ptr< CWalletCreateWallet (WalletContext &context, const std::string &name, std::optional< bool > load_on_start, DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
std::shared_ptr< CWalletRestoreWallet (WalletContext &context, const fs::path &backup_file, const std::string &wallet_name, std::optional< bool > load_on_start, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
void MaybeResendWalletTxs (WalletContext &context)
 Called periodically by the schedule thread. More...
 
static util::Result< fs::pathGetWalletPath (const std::string &name)
 
std::unique_ptr< WalletDatabaseMakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string)
 
bool DoMigration (CWallet &wallet, WalletContext &context, bilingual_str &error, MigrationResult &res) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
util::Result< MigrationResultMigrateLegacyToDescriptor (const std::string &wallet_name, const SecureString &passphrase, WalletContext &context)
 Do all steps to migrate a legacy wallet to a descriptor wallet. More...
 
std::string PurposeToString (AddressPurpose p)
 
std::optional< AddressPurposePurposeFromString (std::string_view s)
 
bool LoadKey (CWallet *pwallet, DataStream &ssKey, DataStream &ssValue, std::string &strErr)
 
bool LoadCryptedKey (CWallet *pwallet, DataStream &ssKey, DataStream &ssValue, std::string &strErr)
 
bool LoadEncryptionKey (CWallet *pwallet, DataStream &ssKey, DataStream &ssValue, std::string &strErr)
 
bool LoadHDChain (CWallet *pwallet, DataStream &ssValue, std::string &strErr)
 
static DBErrors LoadMinVersion (CWallet *pwallet, DatabaseBatch &batch) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static DBErrors LoadWalletFlags (CWallet *pwallet, DatabaseBatch &batch) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static LoadResult LoadRecords (CWallet *pwallet, DatabaseBatch &batch, const std::string &key, DataStream &prefix, LoadFunc load_func)
 
static LoadResult LoadRecords (CWallet *pwallet, DatabaseBatch &batch, const std::string &key, LoadFunc load_func)
 
static DBErrors LoadLegacyWalletRecords (CWallet *pwallet, DatabaseBatch &batch, int last_client) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
template<typename... Args>
static DataStream PrefixStream (const Args &... args)
 
static DBErrors LoadDescriptorWalletRecords (CWallet *pwallet, DatabaseBatch &batch, int last_client) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static DBErrors LoadAddressBookRecords (CWallet *pwallet, DatabaseBatch &batch) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static DBErrors LoadTxRecords (CWallet *pwallet, DatabaseBatch &batch, std::vector< uint256 > &upgraded_txs, bool &any_unordered) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static DBErrors LoadActiveSPKMs (CWallet *pwallet, DatabaseBatch &batch) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static DBErrors LoadDecryptionKeys (CWallet *pwallet, DatabaseBatch &batch) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static bool RunWithinTxn (WalletBatch &batch, std::string_view process_desc, const std::function< bool(WalletBatch &)> &func)
 
bool RunWithinTxn (WalletDatabase &database, std::string_view process_desc, const std::function< bool(WalletBatch &)> &func)
 Executes the provided function 'func' within a database transaction context. More...
 
void MaybeCompactWalletDB (WalletContext &context)
 Compacts BDB state so that wallet.dat is self-contained (if there are changes) More...
 
fs::path GetWalletDir ()
 Get the path of the wallet directory. More...
 
bool IsFeatureSupported (int wallet_version, int feature_version)
 
WalletFeature GetClosestWalletFeature (int version)
 
WalletDescriptor GenerateWalletDescriptor (const CExtPubKey &master_key, const OutputType &addr_type, bool internal)
 

Variables

static constexpr auto REVERSE_BYTE_ORDER {std::endian::native == std::endian::little ? 4321 : 1234}
 
const int DEFAULT_MIN_DEPTH = 0
 
const int DEFAULT_MAX_DEPTH = 9999999
 
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS = false
 Default for -avoidpartialspends. More...
 
struct {
descending
 
struct {
descending_effval_weight
 
static const size_t TOTAL_TRIES = 100000
 
static constexpr CAmount CHANGE_LOWER {50000}
 lower bound for randomly-chosen target change amount More...
 
static constexpr CAmount CHANGE_UPPER {1000000}
 upper bound for randomly-chosen target change amount More...
 
const unsigned int WALLET_CRYPTO_KEY_SIZE = 32
 
const unsigned int WALLET_CRYPTO_SALT_SIZE = 8
 
const unsigned int WALLET_CRYPTO_IV_SIZE = 16
 
static const std::string DUMP_MAGIC = "BITCOIN_CORE_WALLET_DUMP"
 
uint32_t DUMP_VERSION = 1
 
constexpr uint32_t BTREE_MAGIC = 0x00053162
 
constexpr uint32_t BTREE_MAGIC_OE = 0x62310500
 
static const std::vector< std::byte > SUBDATABASE_NAME = {std::byte{'m'}, std::byte{'a'}, std::byte{'i'}, std::byte{'n'}}
 
static const int64_t TIMESTAMP_MIN = 0
 
static const std::string WALLET_ENDPOINT_BASE = "/wallet/"
 
const std::string HELP_REQUIRING_PASSPHRASE {"\nRequires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.\n"}
 
static const RPCResult RESULT_LAST_PROCESSED_BLOCK
 
static const std::map< uint64_t, std::string > WALLET_FLAG_CAVEATS
 
static const char * HEADER_END = "HEADER=END"
 
static const char * DATA_END = "DATA=END"
 
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000
 Value for the first BIP 32 hardened derivation. Can be used as a bit mask and as a value. See BIP 32 for more details. More...
 
static constexpr int64_t UNKNOWN_TIME = std::numeric_limits<int64_t>::max()
 Constant representing an unknown spkm creation time. More...
 
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000
 Default for -keypool. More...
 
static const std::unordered_set< OutputTypeLEGACY_OUTPUT_TYPES
 OutputTypes supported by the LegacyScriptPubKeyMan. More...
 
static constexpr size_t OUTPUT_GROUP_MAX_ENTRIES {100}
 
static constexpr int32_t WALLET_SCHEMA_VERSION = 0
 
static const CoinEligibilityFilter filter_standard (1, 6, 0)
 
static const CoinEligibilityFilter filter_confirmed (1, 1, 0)
 
static const CoinEligibilityFilter filter_standard_extra (6, 6, 0)
 
static int nextLockTime = 0
 
static int nextLockTime = 0
 
static const DatabaseFormat DATABASE_FORMATS []
 
const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj"
 
static GlobalMutex g_loading_wallet_mutex
 
static GlobalMutex g_wallet_release_mutex
 
static std::condition_variable g_wallet_release_cv
 
constexpr CAmount DEFAULT_PAY_TX_FEE = 0
 -paytxfee default More...
 
static const CAmount DEFAULT_FALLBACK_FEE = 0
 -fallbackfee default More...
 
static const CAmount DEFAULT_DISCARD_FEE = 10000
 -discardfee default More...
 
static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000
 -mintxfee default More...
 
static const CAmount DEFAULT_CONSOLIDATE_FEERATE {10000}
 -consolidatefeerate default More...
 
static const CAmount DEFAULT_MAX_AVOIDPARTIALSPEND_FEE = 0
 maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled by default More...
 
constexpr CAmount HIGH_APS_FEE {COIN / 10000}
 discourage APS fee higher than this amount More...
 
static const CAmount WALLET_INCREMENTAL_RELAY_FEE = 5000
 minimum recommended increment for replacement txs More...
 
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true
 Default for -spendzeroconfchange. More...
 
static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS {true}
 Default for -walletrejectlongchains. More...
 
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6
 -txconfirmtarget default More...
 
static const bool DEFAULT_WALLET_RBF = true
 -walletrbf default More...
 
static const bool DEFAULT_WALLETBROADCAST = true
 
static const bool DEFAULT_DISABLE_WALLET = false
 
static const bool DEFAULT_WALLETCROSSCHAIN = false
 
constexpr CAmount DEFAULT_TRANSACTION_MAXFEE {COIN / 10}
 -maxtxfee default More...
 
constexpr CAmount HIGH_TX_FEE_PER_KB {COIN / 100}
 Discourage users to set fees higher than this amount (in satoshis) per kB. More...
 
constexpr CAmount HIGH_MAX_TX_FEE {100 * HIGH_TX_FEE_PER_KB}
 -maxtxfee will warn if called with a higher fee than this amount (in satoshis) More...
 
static constexpr size_t DUMMY_NESTED_P2WPKH_INPUT_SIZE = 91
 Pre-calculated constants for input size estimation in virtual size More...
 
constexpr OutputType DEFAULT_ADDRESS_TYPE {OutputType::BECH32}
 Default for -addresstype. More...
 
static constexpr uint64_t KNOWN_WALLET_FLAGS
 
static constexpr uint64_t MUTABLE_WALLET_FLAGS
 
static const std::map< std::string, WalletFlagsWALLET_FLAG_MAP
 
static const bool DEFAULT_FLUSHWALLET = true
 Overview of wallet database classes: More...
 

Typedef Documentation

◆ BerkeleyROData

using wallet::BerkeleyROData = typedef std::map<SerializeData, SerializeData, std::less<> >

Definition at line 14 of file migrate.h.

◆ CKeyingMaterial

typedef std::vector<unsigned char, secure_allocator<unsigned char> > wallet::CKeyingMaterial

Definition at line 62 of file crypter.h.

◆ CoinSet

typedef std::set<std::shared_ptr<COutput> > wallet::CoinSet

Definition at line 33 of file coinselector_tests.cpp.

◆ FilteredOutputGroups

Definition at line 295 of file coinselection.h.

◆ isminefilter

typedef std::underlying_type< isminetype >::type wallet::isminefilter

used for bitflags of isminetype

Definition at line 48 of file wallet.h.

◆ KeyValPair

typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > wallet::KeyValPair

Definition at line 21 of file salvage.cpp.

◆ LoadFunc

using wallet::LoadFunc = typedef std::function<DBErrors(CWallet* pwallet, DataStream& key, DataStream& value, std::string& err)>

Definition at line 484 of file walletdb.cpp.

◆ LoadWalletFn

using wallet::LoadWalletFn = typedef std::function<void(std::unique_ptr<interfaces::Wallet> wallet)>

Definition at line 24 of file context.h.

◆ mapValue_t

typedef std::map<std::string, std::string> wallet::mapValue_t

Definition at line 149 of file transaction.h.

◆ MockableData

using wallet::MockableData = typedef std::map<SerializeData, SerializeData, std::less<> >

Definition at line 53 of file util.h.

◆ SyncTxState

Subset of states transaction sync logic is implemented to handle.

Definition at line 81 of file transaction.h.

◆ TxState

All possible CWalletTx states.

Definition at line 78 of file transaction.h.

◆ valtype

typedef std::vector<unsigned char> wallet::valtype

Definition at line 52 of file scriptpubkeyman.cpp.

Enumeration Type Documentation

◆ AddressPurpose

Address purpose field that has been been stored with wallet sending and receiving addresses since BIP70 payment protocol support was added in https://github.com/bitcoin/bitcoin/pull/2539.

This field is not currently used for any logic inside the wallet, but it is still shown in RPC and GUI interfaces and saved for new addresses. It is basically redundant with an address's IsMine() result.

Enumerator
RECEIVE 
SEND 
REFUND 

Never set in current code may be present in older wallet databases.

Definition at line 61 of file types.h.

◆ BTreeFlags

enum wallet::BTreeFlags : uint32_t
strong
Enumerator
SUBDB 

Definition at line 51 of file migrate.cpp.

◆ DatabaseFormat

Enumerator
BERKELEY 
SQLITE 
BERKELEY_RO 
BERKELEY_SWAP 

Definition at line 183 of file db.h.

◆ DatabaseStatus

Enumerator
SUCCESS 
FAILED_BAD_PATH 
FAILED_BAD_FORMAT 
FAILED_ALREADY_LOADED 
FAILED_ALREADY_EXISTS 
FAILED_NOT_FOUND 
FAILED_CREATE 
FAILED_LOAD 
FAILED_VERIFY 
FAILED_ENCRYPT 
FAILED_INVALID_BACKUP_FILE 

Definition at line 204 of file db.h.

◆ DBErrors

enum wallet::DBErrors : int
strong

Error statuses for the wallet database.

Values are in order of severity. When multiple errors occur, the most severe (highest value) will be returned.

Enumerator
LOAD_OK 
NEED_RESCAN 
NEED_REWRITE 
EXTERNAL_SIGNER_SUPPORT_REQUIRED 
NONCRITICAL_ERROR 
TOO_NEW 
UNKNOWN_DESCRIPTOR 
LOAD_FAIL 
UNEXPECTED_LEGACY_ENTRY 
CORRUPT 

Definition at line 47 of file walletdb.h.

◆ isminetype

enum wallet::isminetype : unsigned int

IsMine() return codes, which depend on ScriptPubKeyMan implementation.

Not every ScriptPubKeyMan covers all types, please refer to https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md#ismine-semantics for better understanding.

For LegacyScriptPubKeyMan, ISMINE_NO: the scriptPubKey is not in the wallet; ISMINE_WATCH_ONLY: the scriptPubKey has been imported into the wallet; ISMINE_SPENDABLE: the scriptPubKey corresponds to an address owned by the wallet user (can spend with the private key); ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user; ISMINE_ALL: all ISMINE flags except for USED; ISMINE_ALL_USED: all ISMINE flags including USED; ISMINE_ENUM_ELEMENTS: the number of isminetype enum elements.

For DescriptorScriptPubKeyMan and future ScriptPubKeyMan, ISMINE_NO: the scriptPubKey is not in the wallet; ISMINE_SPENDABLE: the scriptPubKey matches a scriptPubKey in the wallet. ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user.

Enumerator
ISMINE_NO 
ISMINE_WATCH_ONLY 
ISMINE_SPENDABLE 
ISMINE_USED 
ISMINE_ALL 
ISMINE_ALL_USED 
ISMINE_ENUM_ELEMENTS 

Definition at line 41 of file types.h.

◆ PageType

enum wallet::PageType : uint8_t
strong
Enumerator
BTREE_INTERNAL 
BTREE_LEAF 
OVERFLOW_DATA 
BTREE_META 

Definition at line 22 of file migrate.cpp.

◆ RecordType

enum wallet::RecordType : uint8_t
strong
Enumerator
KEYDATA 
OVERFLOW_DATA 
DELETE 

Definition at line 44 of file migrate.cpp.

◆ ScriptContext

enum wallet::ScriptContext
strong
Enumerator
TOP 

Top-level scriptPubKey.

P2SH 

P2SH redeemScript.

WITNESS_V0 

P2WSH witnessScript.

Definition at line 842 of file backup.cpp.

◆ SelectionAlgorithm

enum wallet::SelectionAlgorithm : uint8_t
strong
Enumerator
BNB 
KNAPSACK 
SRD 
CG 
MANUAL 

Definition at line 313 of file coinselection.h.

◆ WalletFeature

(client) version numbers for particular wallet features

Enumerator
FEATURE_BASE 
FEATURE_WALLETCRYPT 
FEATURE_COMPRPUBKEY 
FEATURE_HD 
FEATURE_HD_SPLIT 
FEATURE_NO_DEFAULT_KEY 
FEATURE_PRE_SPLIT_KEYPOOL 
FEATURE_LATEST 

Definition at line 15 of file walletutil.h.

◆ WalletFlags

enum wallet::WalletFlags : uint64_t
Enumerator
WALLET_FLAG_AVOID_REUSE 
WALLET_FLAG_KEY_ORIGIN_METADATA 
WALLET_FLAG_LAST_HARDENED_XPUB_CACHED 
WALLET_FLAG_DISABLE_PRIVATE_KEYS 
WALLET_FLAG_BLANK_WALLET 

Flag set when a wallet contains no HD seed and no private keys, scripts, addresses, and other watch only things, and is therefore "blank.".

The main function this flag serves is to distinguish a blank wallet from a newly created wallet when the wallet database is loaded, to avoid initialization that should only happen on first run.

A secondary function of this flag, which applies to descriptor wallets only, is to serve as an ongoing indication that descriptors in the wallet should be created manually, and that the wallet should not generate automatically generate new descriptors if it is later encrypted. To support this behavior, descriptor wallets unlike legacy wallets do not automatically unset the BLANK flag when things are imported.

This flag is also a mandatory flag to prevent previous versions of bitcoin from opening the wallet, thinking it was newly created, and then improperly reinitializing it.

WALLET_FLAG_DESCRIPTORS 

Indicate that this wallet supports DescriptorScriptPubKeyMan.

WALLET_FLAG_EXTERNAL_SIGNER 

Indicates that the wallet needs an external signer.

Definition at line 36 of file walletutil.h.

Function Documentation

◆ abandontransaction()

RPCHelpMan wallet::abandontransaction ( )

Definition at line 808 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ abortrescan()

RPCHelpMan wallet::abortrescan ( )

Definition at line 939 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_coin() [1/4]

static void wallet::add_coin ( CoinsResult available_coins,
CWallet wallet,
const CAmount nValue,
CFeeRate  feerate = CFeeRate(0),
int  nAge = 6*24,
bool  fIsFromMe = false,
int  nInput = 0,
bool  spendable = false,
int  custom_size = 0 
)
static

Definition at line 74 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ add_coin() [2/4]

static void wallet::add_coin ( const CAmount nValue,
int  nInput,
SelectionResult result 
)
static

Definition at line 49 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ add_coin() [3/4]

static void wallet::add_coin ( const CAmount nValue,
int  nInput,
SelectionResult result,
CAmount  fee,
CAmount  long_term_fee 
)
static

Definition at line 61 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ add_coin() [4/4]

static void wallet::add_coin ( const CAmount nValue,
int  nInput,
std::vector< COutput > &  set 
)
static

Definition at line 40 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCoin()

static void wallet::addCoin ( CoinsResult coins,
CWallet wallet,
const CTxDestination dest,
const CAmount nValue,
bool  is_from_me,
CFeeRate  fee_rate = CFeeRate(0),
int  depth = 6 
)
static

Definition at line 29 of file group_outputs_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddCoin()

static void wallet::AddCoin ( const CAmount value,
int  n_input,
int  n_input_bytes,
int  locktime,
std::vector< COutput > &  coins,
CFeeRate  fee_rate 
)
static

Definition at line 19 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddKey()

static void wallet::AddKey ( CWallet wallet,
const CKey key 
)
static

Definition at line 63 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addmultisigaddress()

RPCHelpMan wallet::addmultisigaddress ( )

Definition at line 218 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddTx() [1/2]

static int64_t wallet::AddTx ( ChainstateManager chainman,
CWallet wallet,
uint32_t  lockTime,
int64_t  mockTime,
int64_t  blockTime 
)
static

Definition at line 361 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddTx() [2/2]

static void wallet::AddTx ( CWallet wallet)
static

Definition at line 22 of file wallet_loading.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddWallet()

bool wallet::AddWallet ( WalletContext context,
const std::shared_ptr< CWallet > &  wallet 
)

Definition at line 144 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddWalletSetting()

bool wallet::AddWalletSetting ( interfaces::Chain chain,
const std::string &  wallet_name 
)

Add wallet name to persistent configuration so it will be loaded on startup.

Definition at line 94 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AllInputsMine()

bool wallet::AllInputsMine ( const CWallet wallet,
const CTransaction tx,
const isminefilter filter 
)

Returns whether all of the inputs match the filter.

Definition at line 22 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AppendLastProcessedBlock()

void wallet::AppendLastProcessedBlock ( UniValue entry,
const CWallet wallet 
)

Definition at line 182 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApproximateBestSubset()

static void wallet::ApproximateBestSubset ( FastRandomContext insecure_rand,
const std::vector< OutputGroup > &  groups,
const CAmount nTotalLower,
const CAmount nTargetValue,
std::vector< char > &  vfBest,
CAmount nBest,
int  max_selection_weight,
int  iterations = 1000 
)
static

Find a subset of the OutputGroups that is at least as large as, but as close as possible to, the target amount; solve subset sum.

param@[in] groups OutputGroups to choose from, sorted by value in descending order. param@[in] nTotalLower Total (effective) value of the UTXOs in groups. param@[in] nTargetValue Subset sum target, not including change. param@[out] vfBest Boolean vector representing the subset chosen that is closest to nTargetValue, with indices corresponding to groups. If the ith entry is true, that means the ith group in groups was selected. param@[out] nBest Total amount of subset chosen that is closest to nTargetValue. paramp[in] max_selection_weight The maximum allowed weight for a selection result to be valid. param@[in] iterations Maximum number of tries.

Definition at line 603 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AttemptSelection()

util::Result< SelectionResult > wallet::AttemptSelection ( interfaces::Chain chain,
const CAmount nTargetValue,
OutputGroupTypeMap groups,
const CoinSelectionParams coin_selection_params,
bool  allow_mixed_output_types 
)

Attempt to find a valid input set that preserves privacy by not mixing OutputTypes.

ChooseSelectionResult() will be called on each OutputType individually and the best the solution (according to the waste metric) will be chosen. If a valid input cannot be found from any single OutputType, fallback to running ChooseSelectionResult() over all available coins.

param@[in] chain The chain interface to get information on unconfirmed UTXOs bump fees param@[in] nTargetValue The target value param@[in] groups The grouped outputs mapped by coin eligibility filters param@[in] coin_selection_params Parameters for the coin selection param@[in] allow_mixed_output_types Relax restriction that SelectionResults must be of the same OutputType returns If successful, a SelectionResult containing the input set If failed, returns (1) an empty error message if the target was not reached (general "Insufficient funds") or (2) an specific error message if there was something particularly wrong (e.g. a selection result that surpassed the tx max weight size).

Definition at line 658 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AutomaticCoinSelection()

util::Result< SelectionResult > wallet::AutomaticCoinSelection ( const CWallet wallet,
CoinsResult available_coins,
const CAmount nTargetValue,
const CoinSelectionParams coin_selection_params 
)

Select a set of coins such that nTargetValue is met; never select unconfirmed coins if they are not ours param@[in] wallet The wallet which provides data necessary to spend the selected coins param@[in] available_coins The struct of coins, organized by OutputType, available for selection prior to filtering param@[in] nTargetValue The target value param@[in] coin_selection_params Parameters for this coin selection such as feerates, whether to avoid partial spends, and whether to subtract the fee from the outputs.

returns If successful, a SelectionResult containing the selected coins If failed, returns (1) an empty error message if the target was not reached (general "Insufficient funds") or (2) an specific error message if there was something particularly wrong (e.g. a selection result that surpassed the tx max weight size).

Definition at line 822 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AvailableCoins()

CoinsResult wallet::AvailableCoins ( const CWallet wallet,
const CCoinControl coinControl,
std::optional< CFeeRate feerate,
const CoinFilterParams params 
)

Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType.

Definition at line 309 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AvailableCoinsListUnspent()

CoinsResult wallet::AvailableCoinsListUnspent ( const CWallet wallet,
const CCoinControl coinControl = nullptr,
CoinFilterParams  params = {} 
)

Wrapper function for AvailableCoins which skips the feerate and CoinFilterParams::only_spendable parameters.

Use this function to list all available coins (e.g. listunspent RPC) while not intending to fund a transaction.

Definition at line 473 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ backupwallet()

RPCHelpMan wallet::backupwallet ( )

Definition at line 1847 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BDBDataFile()

fs::path wallet::BDBDataFile ( const fs::path wallet_path)

Definition at line 67 of file db.cpp.

Here is the caller graph for this function:

◆ BENCHMARK() [1/4]

wallet::BENCHMARK ( WalletBalanceClean  ,
benchmark::PriorityLevel::HIGH   
)

◆ BENCHMARK() [2/4]

wallet::BENCHMARK ( WalletBalanceDirty  ,
benchmark::PriorityLevel::HIGH   
)

◆ BENCHMARK() [3/4]

wallet::BENCHMARK ( WalletBalanceMine  ,
benchmark::PriorityLevel::HIGH   
)

◆ BENCHMARK() [4/4]

wallet::BENCHMARK ( WalletBalanceWatch  ,
benchmark::PriorityLevel::HIGH   
)

◆ BerkeleyDatabaseSanityCheck()

bool wallet::BerkeleyDatabaseSanityCheck ( )

Perform sanity check of runtime BDB version versus linked BDB version.

Definition at line 824 of file bdb.cpp.

Here is the caller graph for this function:

◆ BerkeleyDatabaseVersion()

std::string wallet::BerkeleyDatabaseVersion ( )

Definition at line 841 of file bdb.cpp.

Here is the caller graph for this function:

◆ BindBlobToStatement()

static bool wallet::BindBlobToStatement ( sqlite3_stmt *  stmt,
int  index,
Span< const std::byte >  blob,
const std::string &  description 
)
static

Definition at line 61 of file sqlite.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BOOST_AUTO_TEST_CASE() [1/41]

wallet::BOOST_AUTO_TEST_CASE ( ApproximateBestSubset  )

Definition at line 804 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/41]

wallet::BOOST_AUTO_TEST_CASE ( bnb_search_test  )

Definition at line 191 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/41]

wallet::BOOST_AUTO_TEST_CASE ( bnb_sffo_restriction  )

Definition at line 458 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/41]

wallet::BOOST_AUTO_TEST_CASE ( bump_fee_test  )

Definition at line 1006 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/41]

wallet::BOOST_AUTO_TEST_CASE ( CanProvide  )

Definition at line 19 of file scriptpubkeyman_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/41]

wallet::BOOST_AUTO_TEST_CASE ( check_max_selection_weight  )

Definition at line 1418 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/41]

wallet::BOOST_AUTO_TEST_CASE ( coin_grinder_tests  )

Definition at line 1109 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/41]

wallet::BOOST_AUTO_TEST_CASE ( ComputeTimeSmart  )

Definition at line 389 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/41]

wallet::BOOST_AUTO_TEST_CASE ( db_availability_after_write_error  )

Definition at line 230 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/41]

wallet::BOOST_AUTO_TEST_CASE ( db_cursor_prefix_byte_test  )

Definition at line 198 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [11/41]

wallet::BOOST_AUTO_TEST_CASE ( db_cursor_prefix_range_test  )

Definition at line 146 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [12/41]

wallet::BOOST_AUTO_TEST_CASE ( decrypt  )

Definition at line 107 of file wallet_crypto_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/41]

wallet::BOOST_AUTO_TEST_CASE ( effective_value_test  )

Definition at line 1062 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [14/41]

wallet::BOOST_AUTO_TEST_CASE ( encrypt  )

Definition at line 92 of file wallet_crypto_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/41]

wallet::BOOST_AUTO_TEST_CASE ( erase_prefix  )

Definition at line 259 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [16/41]

wallet::BOOST_AUTO_TEST_CASE ( getwalletenv_directory  )

Definition at line 86 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [17/41]

wallet::BOOST_AUTO_TEST_CASE ( getwalletenv_file  )

Definition at line 72 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [18/41]

wallet::BOOST_AUTO_TEST_CASE ( getwalletenv_g_dbenvs_free_instance  )

Definition at line 111 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [19/41]

wallet::BOOST_AUTO_TEST_CASE ( getwalletenv_g_dbenvs_multiple  )

Definition at line 97 of file db_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [20/41]

wallet::BOOST_AUTO_TEST_CASE ( ismine_standard  )

Definition at line 41 of file ismine_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [21/41]

wallet::BOOST_AUTO_TEST_CASE ( knapsack_solver_test  )

Definition at line 496 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [22/41]

wallet::BOOST_AUTO_TEST_CASE ( outputs_grouping_tests  )

Definition at line 109 of file group_outputs_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [23/41]

wallet::BOOST_AUTO_TEST_CASE ( parse_hd_keypath  )

Definition at line 80 of file psbt_wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [24/41]

wallet::BOOST_AUTO_TEST_CASE ( passphrase  )

Definition at line 76 of file wallet_crypto_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [25/41]

wallet::BOOST_AUTO_TEST_CASE ( psbt_updater_test  )

Definition at line 30 of file psbt_wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [26/41]

wallet::BOOST_AUTO_TEST_CASE ( roundtrip  )

Definition at line 14 of file wallet_transaction_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [27/41]

wallet::BOOST_AUTO_TEST_CASE ( SelectCoins_effective_value_test  )

Definition at line 1513 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [28/41]

wallet::BOOST_AUTO_TEST_CASE ( SelectCoins_test  )

Definition at line 823 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [29/41]

wallet::BOOST_AUTO_TEST_CASE ( srd_tests  )

Definition at line 1320 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [30/41]

wallet::BOOST_AUTO_TEST_CASE ( util_ParseISO8601DateTime  )

Definition at line 13 of file rpc_util_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [31/41]

wallet::BOOST_AUTO_TEST_CASE ( walletdb_read_write_deadlock  )

Definition at line 32 of file walletdb_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [32/41]

wallet::BOOST_AUTO_TEST_CASE ( walletdb_readkeyvalue  )

When ReadKeyValue() reads from either a "key" or "wkey" it first reads the DataStream into a CPrivKey or CWalletKey respectively and then reads a hash of the pubkey and privkey into a uint256. Wallets from 0.8 or before do not store the pubkey/privkey hash, trying to read the hash from old wallets throws an exception, for backwards compatibility this read is wrapped in a try block to silently fail. The test here makes sure the type of exception thrown from DataStream::read() matches the type we expect, otherwise we need to update the "key"/"wkey" exception type caught.

Definition at line 17 of file walletdb_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [33/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_custom  )

Definition at line 26 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [34/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_default  )

Definition at line 16 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [35/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_does_not_exist  )

Definition at line 36 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [36/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_is_not_directory  )

Definition at line 46 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [37/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_is_not_relative  )

Definition at line 56 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [38/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_no_trailing  )

Definition at line 66 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [39/41]

wallet::BOOST_AUTO_TEST_CASE ( walletinit_verify_walletdir_no_trailing2  )

Definition at line 76 of file init_tests.cpp.

◆ BOOST_AUTO_TEST_CASE() [40/41]

wallet::BOOST_AUTO_TEST_CASE ( waste_test  )

Definition at line 874 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [41/41]

wallet::BOOST_AUTO_TEST_CASE ( WatchOnlyPubKeys  )

Definition at line 512 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [1/19]

wallet::BOOST_FIXTURE_TEST_CASE ( BasicOutputTypesTest  ,
ListCoinsTest   
)

Definition at line 659 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [2/19]

wallet::BOOST_FIXTURE_TEST_CASE ( coin_mark_dirty_immature_credit  ,
TestChain100Setup   
)

Definition at line 338 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [3/19]

wallet::BOOST_FIXTURE_TEST_CASE ( CreateWallet  ,
TestChain100Setup   
)

Test CWallet::Create() and its behavior handling potential race conditions if it's called the same time an incoming transaction shows up in the mempool or a new block.

It isn't possible to verify there aren't race condition in every case, so this test just checks two specific cases and ensures that timing of notifications in these cases doesn't prevent the wallet from detecting transactions.

In the first case, block and mempool transactions are created before the wallet is loaded, but notifications about these transactions are delayed until after it is loaded. The notifications are superfluous in this case, so the test verifies the transactions are detected before they arrive.

In the second case, block and mempool transactions are created after the wallet rescan and notifications are immediately synced, to verify the wallet must already have a handler in place for them, and there's no gap after rescanning where new transactions in new blocks could be lost.

Definition at line 786 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [4/19]

wallet::BOOST_FIXTURE_TEST_CASE ( CreateWalletWithoutChain  ,
BasicTestingSetup   
)

Definition at line 886 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [5/19]

wallet::BOOST_FIXTURE_TEST_CASE ( dummy_input_size_test  ,
TestChain100Setup   
)

Definition at line 741 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [6/19]

wallet::BOOST_FIXTURE_TEST_CASE ( importmulti_rescan  ,
TestChain100Setup   
)

Definition at line 197 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [7/19]

wallet::BOOST_FIXTURE_TEST_CASE ( importwallet_rescan  ,
TestChain100Setup   
)

Definition at line 262 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [8/19]

wallet::BOOST_FIXTURE_TEST_CASE ( ListCoinsTest  ,
ListCoinsTestingSetup   
)

Definition at line 588 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [9/19]

wallet::BOOST_FIXTURE_TEST_CASE ( LoadReceiveRequests  ,
TestingSetup   
)

Definition at line 427 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [10/19]

wallet::BOOST_FIXTURE_TEST_CASE ( RemoveTxs  ,
TestChain100Setup   
)

Definition at line 895 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [11/19]

wallet::BOOST_FIXTURE_TEST_CASE ( scan_for_wallet_transactions  ,
TestChain100Setup   
)

Definition at line 74 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [12/19]

wallet::BOOST_FIXTURE_TEST_CASE ( SubtractFee  ,
TestChain100Setup   
)

Definition at line 19 of file spend_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [13/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_coinsresult_test  ,
BasicTestingSetup   
)

Definition at line 1555 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [14/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_descriptor_test  ,
BasicTestingSetup   
)

Definition at line 753 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [15/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_disableprivkeys  ,
TestChain100Setup   
)

Definition at line 685 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [16/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_duplicated_preset_inputs_test  ,
TestChain100Setup   
)

Definition at line 64 of file spend_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [17/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_load_ckey  ,
TestingSetup   
)

Definition at line 114 of file walletload_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [18/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_load_descriptors  ,
TestingSetup   
)

Definition at line 40 of file walletload_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [19/19]

wallet::BOOST_FIXTURE_TEST_CASE ( wallet_sync_tx_invalid_state_test  ,
TestingSetup   
)

Checks a wallet invalid state where the inputs (prev-txs) of a new arriving transaction are not marked dirty, while the transaction that spends them exist inside the in-memory wallet tx map (not stored on db due a db write failure).

Definition at line 934 of file wallet_tests.cpp.

Here is the call graph for this function:

◆ bumpfee()

RPCHelpMan wallet::bumpfee ( )

Definition at line 1191 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bumpfee_helper()

static RPCHelpMan wallet::bumpfee_helper ( std::string  method_name)
static

Definition at line 985 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxGetAmounts()

void wallet::CachedTxGetAmounts ( const CWallet wallet,
const CWalletTx wtx,
std::list< COutputEntry > &  listReceived,
std::list< COutputEntry > &  listSent,
CAmount nFee,
const isminefilter filter,
bool  include_change 
)

Definition at line 194 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxGetAvailableCredit()

CAmount wallet::CachedTxGetAvailableCredit ( const CWallet wallet,
const CWalletTx wtx,
const isminefilter filter 
)

Definition at line 159 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxGetChange()

CAmount wallet::CachedTxGetChange ( const CWallet wallet,
const CWalletTx wtx 
)

Definition at line 139 of file receive.cpp.

Here is the call graph for this function:

◆ CachedTxGetCredit()

CAmount wallet::CachedTxGetCredit ( const CWallet wallet,
const CWalletTx wtx,
const isminefilter filter 
)

Definition at line 109 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxGetDebit()

CAmount wallet::CachedTxGetDebit ( const CWallet wallet,
const CWalletTx wtx,
const isminefilter filter 
)

filter decides which addresses will count towards the debit

Definition at line 126 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxGetImmatureCredit()

CAmount wallet::CachedTxGetImmatureCredit ( const CWallet wallet,
const CWalletTx wtx,
const isminefilter filter 
)

Definition at line 148 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxIsFromMe()

bool wallet::CachedTxIsFromMe ( const CWallet wallet,
const CWalletTx wtx,
const isminefilter filter 
)

Definition at line 251 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CachedTxIsTrusted() [1/2]

bool wallet::CachedTxIsTrusted ( const CWallet wallet,
const CWalletTx wtx 
)

Definition at line 286 of file receive.cpp.

Here is the call graph for this function:

◆ CachedTxIsTrusted() [2/2]

bool wallet::CachedTxIsTrusted ( const CWallet wallet,
const CWalletTx wtx,
std::set< uint256 > &  trusted_parents 
)

Definition at line 257 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMaximumSignedInputSize() [1/2]

int wallet::CalculateMaximumSignedInputSize ( const CTxOut txout,
const COutPoint  outpoint,
const SigningProvider provider,
bool  can_grind_r,
const CCoinControl coin_control 
)

Definition at line 85 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMaximumSignedInputSize() [2/2]

int wallet::CalculateMaximumSignedInputSize ( const CTxOut txout,
const CWallet pwallet,
const CCoinControl coin_control 
)

Get the marginal bytes if spending the specified output from this transaction.

Use CoinControl to determine whether to expect signature grinding when calculating the size of the input spend.

Definition at line 98 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMaximumSignedTxSize() [1/2]

TxSize wallet::CalculateMaximumSignedTxSize ( const CTransaction tx,
const CWallet wallet,
const CCoinControl coin_control 
)

Definition at line 166 of file spend.cpp.

Here is the call graph for this function:

◆ CalculateMaximumSignedTxSize() [2/2]

TxSize wallet::CalculateMaximumSignedTxSize ( const CTransaction tx,
const CWallet wallet,
const std::vector< CTxOut > &  txouts,
const CCoinControl coin_control 
)

Calculate the size of the transaction using CoinControl to determine whether to expect signature grinding when calculating the size of the input spend.

Definition at line 137 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateNestedKeyhashInputSize()

static size_t wallet::CalculateNestedKeyhashInputSize ( bool  use_max_sig)
static

Definition at line 707 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckFeeRate()

static feebumper::Result wallet::CheckFeeRate ( const CWallet wallet,
const CMutableTransaction mtx,
const CFeeRate newFeerate,
const int64_t  maxTxSize,
CAmount  old_fee,
std::vector< bilingual_str > &  errors 
)
static

Check if the user provided a valid feeRate.

Definition at line 67 of file feebumper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckPrefix()

static void wallet::CheckPrefix ( DatabaseBatch batch,
Span< const std::byte >  prefix,
MockableData  expected 
)
static

Definition at line 48 of file db_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ChooseSelectionResult()

util::Result< SelectionResult > wallet::ChooseSelectionResult ( interfaces::Chain chain,
const CAmount nTargetValue,
Groups groups,
const CoinSelectionParams coin_selection_params 
)

Attempt to find a valid input set that meets the provided eligibility filter and target.

Multiple coin selection algorithms will be run and the input set that produces the least waste (according to the waste metric) will be chosen.

param@[in] chain The chain interface to get information on unconfirmed UTXOs bump fees param@[in] nTargetValue The target value param@[in] groups The struct containing the outputs grouped by script and divided by (1) positive only outputs and (2) all outputs (positive + negative). param@[in] coin_selection_params Parameters for the coin selection returns If successful, a SelectionResult containing the input set If failed, returns (1) an empty error message if the target was not reached (general "Insufficient funds") or (2) an specific error message if there was something particularly wrong (e.g. a selection result that surpassed the tx max weight size).

Definition at line 685 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CoinGrinder() [1/2]

static util::Result<SelectionResult> wallet::CoinGrinder ( const CAmount target,
const CoinSelectionParams cs_params,
const node::NodeContext m_node,
int  max_selection_weight,
std::function< CoinsResult(CWallet &)>  coin_setup 
)
static

Definition at line 1097 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ CoinGrinder() [2/2]

util::Result< SelectionResult > wallet::CoinGrinder ( std::vector< OutputGroup > &  utxo_pool,
const CAmount selection_target,
CAmount  change_target,
int  max_selection_weight 
)

Definition at line 325 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateCoins()

static CAmount wallet::CreateCoins ( FuzzedDataProvider fuzzed_data_provider,
std::vector< COutput > &  utxo_pool,
CoinSelectionParams coin_params,
int &  next_locktime 
)
static

Definition at line 49 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateDescriptor()

wallet::ScriptPubKeyMan* wallet::CreateDescriptor ( CWallet keystore,
const std::string &  desc_str,
const bool  success 
)

Definition at line 22 of file ismine_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateFromDump()

bool wallet::CreateFromDump ( const ArgsManager args,
const std::string &  name,
const fs::path wallet_path,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)

Definition at line 122 of file dump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateMockableWalletDatabase()

std::unique_ptr< WalletDatabase > wallet::CreateMockableWalletDatabase ( MockableData  records)

Definition at line 185 of file util.cpp.

Here is the caller graph for this function:

◆ CreateRecipients()

std::vector<CRecipient> wallet::CreateRecipients ( const std::vector< std::pair< CTxDestination, CAmount >> &  outputs,
const std::set< int > &  subtract_fee_outputs 
)

Definition at line 34 of file spend.cpp.

Here is the caller graph for this function:

◆ CreateSyncedWallet()

std::unique_ptr< CWallet > wallet::CreateSyncedWallet ( interfaces::Chain chain,
CChain cchain,
const CKey key 
)

Definition at line 20 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateTransaction()

util::Result< CreatedTransactionResult > wallet::CreateTransaction ( CWallet wallet,
const std::vector< CRecipient > &  vecSend,
std::optional< unsigned int >  change_pos,
const CCoinControl coin_control,
bool  sign = true 
)

Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed.

Note
passing change_pos as std::nullopt will result in setting a random position

Definition at line 1363 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateTransactionInternal()

static util::Result<CreatedTransactionResult> wallet::CreateTransactionInternal ( CWallet wallet,
const std::vector< CRecipient > &  vecSend,
std::optional< unsigned int >  change_pos,
const CCoinControl coin_control,
bool  sign 
)
static

Definition at line 1005 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createwallet()

static RPCHelpMan wallet::createwallet ( )
static

Definition at line 340 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateWallet()

std::shared_ptr< CWallet > wallet::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 
)

Definition at line 377 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createwalletdescriptor()

static RPCHelpMan wallet::createwalletdescriptor ( )
static

Definition at line 926 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeDumpString()

static std::string wallet::DecodeDumpString ( const std::string &  str)
static

Definition at line 52 of file backup.cpp.

Here is the caller graph for this function:

◆ DecryptKey()

bool wallet::DecryptKey ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCryptedSecret,
const CPubKey vchPubKey,
CKey key 
)

Definition at line 128 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecryptSecret()

bool wallet::DecryptSecret ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCiphertext,
const uint256 nIV,
CKeyingMaterial vchPlaintext 
)

Definition at line 118 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeriveExtKey()

static void wallet::DeriveExtKey ( CExtKey key_in,
unsigned int  index,
CExtKey key_out 
)
static

Try to derive an extended key, throw if it fails.

Definition at line 1120 of file scriptpubkeyman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DescribeWalletAddress()

static UniValue wallet::DescribeWalletAddress ( const CWallet wallet,
const CTxDestination dest 
)
static

Definition at line 507 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DiscourageFeeSniping()

static void wallet::DiscourageFeeSniping ( CMutableTransaction tx,
FastRandomContext rng_fast,
interfaces::Chain chain,
const uint256 block_hash,
int  block_height 
)
static

Set a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain.

Definition at line 939 of file spend.cpp.

Here is the call graph for this function:

◆ DoMigration()

bool wallet::DoMigration ( CWallet wallet,
WalletContext context,
bilingual_str error,
MigrationResult res 
)

Definition at line 4265 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpprivkey()

RPCHelpMan wallet::dumpprivkey ( )

Definition at line 636 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpwallet()

RPCHelpMan wallet::dumpwallet ( )

Definition at line 683 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpWallet()

bool wallet::DumpWallet ( const ArgsManager args,
WalletDatabase db,
bilingual_str error 
)

Definition at line 24 of file dump.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DuplicateMockDatabase()

std::unique_ptr< WalletDatabase > wallet::DuplicateMockDatabase ( WalletDatabase database)

Definition at line 80 of file util.cpp.

Here is the caller graph for this function:

◆ EncodeDumpString()

static std::string wallet::EncodeDumpString ( const std::string &  str)
static

Definition at line 40 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EncryptSecret()

bool wallet::EncryptSecret ( const CKeyingMaterial vMasterKey,
const CKeyingMaterial vchPlaintext,
const uint256 nIV,
std::vector< unsigned char > &  vchCiphertext 
)

Definition at line 108 of file crypter.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encryptwallet()

RPCHelpMan wallet::encryptwallet ( )

Definition at line 216 of file encrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureBlockDataFromTime()

static void wallet::EnsureBlockDataFromTime ( const CWallet wallet,
int64_t  timestamp 
)
static

Definition at line 100 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureConstLegacyScriptPubKeyMan()

const LegacyScriptPubKeyMan & wallet::EnsureConstLegacyScriptPubKeyMan ( const CWallet wallet)

Definition at line 126 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureLegacyScriptPubKeyMan()

LegacyScriptPubKeyMan & wallet::EnsureLegacyScriptPubKeyMan ( CWallet wallet,
bool  also_create 
)

Definition at line 114 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureWalletContext()

WalletContext & wallet::EnsureWalletContext ( const std::any &  context)

Definition at line 104 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnsureWalletIsUnlocked()

void wallet::EnsureWalletIsUnlocked ( const CWallet wallet)

Definition at line 97 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EqualResult()

static bool wallet::EqualResult ( const SelectionResult a,
const SelectionResult b 
)
static

Check if this selection is equal to another one.

Equal means same inputs (i.e same value and prevout)

Definition at line 127 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EquivalentResult()

static bool wallet::EquivalentResult ( const SelectionResult a,
const SelectionResult b 
)
static

Check if SelectionResult a is equivalent to SelectionResult b.

Equivalent means same input values, but maybe different inputs (i.e. same value, different prevout)

Definition at line 109 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ErrorLogCallback()

static void wallet::ErrorLogCallback ( void *  arg,
int  code,
const char *  msg 
)
static

Definition at line 35 of file sqlite.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ErrorMaxWeightExceeded()

static util::Result<SelectionResult> wallet::ErrorMaxWeightExceeded ( )
static

Definition at line 22 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EstimateFeeRate()

static CFeeRate wallet::EstimateFeeRate ( const CWallet wallet,
const CWalletTx wtx,
const CAmount  old_fee,
const CCoinControl coin_control 
)
static

Definition at line 125 of file feebumper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExtractPubKey()

static bool wallet::ExtractPubKey ( const CScript dest,
CPubKey pubKeyOut 
)
static

Definition at line 898 of file scriptpubkeyman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FetchSelectedInputs()

util::Result< PreSelectedInputs > wallet::FetchSelectedInputs ( const CWallet wallet,
const CCoinControl coin_control,
const CoinSelectionParams coin_selection_params 
)

Fetch and validate coin control selected inputs.

Coins could be internal (from the wallet) or external.

Definition at line 262 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindNonChangeParentOutput()

const CTxOut & wallet::FindNonChangeParentOutput ( const CWallet wallet,
const COutPoint outpoint 
)

Find non-change parent output.

Definition at line 479 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FinishTransaction()

static UniValue wallet::FinishTransaction ( const std::shared_ptr< CWallet pwallet,
const UniValue options,
const CMutableTransaction rawTx 
)
static

Definition at line 98 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlushWallets()

void wallet::FlushWallets ( WalletContext context)

Flush all wallets in preparation for shutdown.

Definition at line 159 of file load.cpp.

Here is the call graph for this function:

◆ fundrawtransaction()

RPCHelpMan wallet::fundrawtransaction ( )

Definition at line 736 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FundTransaction() [1/2]

CreatedTransactionResult wallet::FundTransaction ( CWallet wallet,
const CMutableTransaction tx,
const std::vector< CRecipient > &  recipients,
const UniValue options,
CCoinControl coinControl,
bool  override_min_fee 
)

Definition at line 500 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FundTransaction() [2/2]

util::Result< CreatedTransactionResult > wallet::FundTransaction ( CWallet wallet,
const CMutableTransaction tx,
const std::vector< CRecipient > &  vecSend,
std::optional< unsigned int >  change_pos,
bool  lockUnspents,
CCoinControl  coinControl 
)

Insert additional inputs into the transaction by calling CreateTransaction();.

Definition at line 1417 of file spend.cpp.

Here is the call graph for this function:

◆ FundTxDoc()

static std::vector<RPCArg> wallet::FundTxDoc ( bool  solving_data = true)
static

Definition at line 461 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FUZZ_TARGET() [1/3]

wallet::FUZZ_TARGET ( coin_grinder  )

Definition at line 81 of file coinselection.cpp.

Here is the call graph for this function:

◆ FUZZ_TARGET() [2/3]

wallet::FUZZ_TARGET ( coin_grinder_is_optimal  )

Definition at line 138 of file coinselection.cpp.

Here is the call graph for this function:

◆ FUZZ_TARGET() [3/3]

wallet::FUZZ_TARGET ( coinselection  )

Definition at line 219 of file coinselection.cpp.

Here is the call graph for this function:

◆ GenerateChangeTarget()

CAmount wallet::GenerateChangeTarget ( const CAmount  payment_value,
const CAmount  change_fee,
FastRandomContext rng 
)

Choose a random change target for each transaction to make it harder to fingerprint the Core wallet based on the change output values of transactions it creates.

Change target covers at least change fees and adds a random value on top of it. The random value is between 50ksat and min(2 * payment_value, 1milsat) When payment_value <= 25ksat, the value is just 50ksat.

Making change amounts similar to the payment value may help disguise which output(s) are payments are which ones are change. Using double the payment value may increase the number of inputs needed (and thus be more expensive in fees), but breaks analysis techniques which assume the coins selected are just sufficient to cover the payment amount ("unnecessary input" heuristic).

Parameters
[in]payment_valueAverage payment value of the transaction output(s).
[in]change_feeFee for creating a change output.

Definition at line 810 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateWalletDescriptor()

WalletDescriptor wallet::GenerateWalletDescriptor ( const CExtPubKey master_key,
const OutputType addr_type,
bool  internal 
)

Definition at line 49 of file walletutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAddressBalances()

std::map< CTxDestination, CAmount > wallet::GetAddressBalances ( const CWallet wallet)

Definition at line 322 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getaddressesbylabel()

RPCHelpMan wallet::getaddressesbylabel ( )

Definition at line 665 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAddressGroupings()

std::set< std::set< CTxDestination > > wallet::GetAddressGroupings ( const CWallet wallet)

Definition at line 360 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getaddressinfo()

RPCHelpMan wallet::getaddressinfo ( )

Definition at line 519 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAffectedKeys()

std::vector< CKeyID > wallet::GetAffectedKeys ( const CScript spk,
const SigningProvider provider 
)

Definition at line 1539 of file scriptpubkeyman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAlgorithmName()

std::string wallet::GetAlgorithmName ( const SelectionAlgorithm  algo)

Definition at line 962 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAvoidReuseFlag()

bool wallet::GetAvoidReuseFlag ( const CWallet wallet,
const UniValue param 
)

Definition at line 37 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbalance()

RPCHelpMan wallet::getbalance ( )

Definition at line 163 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBalance()

Balance wallet::GetBalance ( const CWallet wallet,
const int  min_depth,
bool  avoid_reuse 
)

Definition at line 293 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbalances()

RPCHelpMan wallet::getbalances ( )

Definition at line 427 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBerkeleyEnv()

std::shared_ptr< BerkeleyEnvironment > wallet::GetBerkeleyEnv ( const fs::path env_directory,
bool  use_shared_memory 
)

Get BerkeleyEnvironment given a directory path.

Parameters
[in]env_directoryPath to environment directory
Returns
A shared pointer to the BerkeleyEnvironment object for the wallet directory, never empty because ~BerkeleyEnvironment erases the weak pointer from the g_dbenvs map.
Postcondition
A new BerkeleyEnvironment weak pointer is inserted into g_dbenvs if the directory path key was not already in the map.

Definition at line 81 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCachableAmount()

static CAmount wallet::GetCachableAmount ( const CWallet wallet,
const CWalletTx wtx,
CWalletTx::AmountType  type,
const isminefilter filter 
)
static

Definition at line 99 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetClosestWalletFeature()

WalletFeature wallet::GetClosestWalletFeature ( int  version)

Definition at line 40 of file walletutil.cpp.

Here is the caller graph for this function:

◆ GetDefaultWallet()

std::shared_ptr< CWallet > wallet::GetDefaultWallet ( WalletContext context,
size_t &  count 
)

Definition at line 188 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetDescriptor()

static std::unique_ptr<Descriptor> wallet::GetDescriptor ( const CWallet wallet,
const CCoinControl coin_control,
const CScript  script_pubkey 
)
static

Infer a descriptor for the given output script.

Definition at line 105 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDiscardRate()

CFeeRate wallet::GetDiscardRate ( const CWallet wallet)

Return the maximum feerate for discarding change.

Definition at line 84 of file fees.cpp.

Here is the caller graph for this function:

◆ gethdkeys()

RPCHelpMan wallet::gethdkeys ( )

Definition at line 818 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetImportTimestamp()

static int64_t wallet::GetImportTimestamp ( const UniValue data,
int64_t  now 
)
static

Definition at line 1222 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMinimumFee()

CAmount wallet::GetMinimumFee ( const CWallet wallet,
unsigned int  nTxBytes,
const CCoinControl coin_control,
FeeCalculation feeCalc 
)

Estimate the minimum fee considering user set parameters and the required fee.

Definition at line 19 of file fees.cpp.

Here is the call graph for this function:

◆ GetMinimumFeeRate()

CFeeRate wallet::GetMinimumFeeRate ( const CWallet wallet,
const CCoinControl coin_control,
FeeCalculation feeCalc 
)

Estimate the minimum fee rate considering user set parameters and the required fee.

Definition at line 29 of file fees.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMockableDatabase()

MockableDatabase & wallet::GetMockableDatabase ( CWallet wallet)

Definition at line 190 of file util.cpp.

Here is the caller graph for this function:

◆ getnewaddress() [1/2]

RPCHelpMan wallet::getnewaddress ( )

Definition at line 21 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getnewaddress() [2/2]

std::string wallet::getnewaddress ( CWallet w)

Returns a new encoded destination from the wallet (hardcoded to BECH32)

Definition at line 85 of file util.cpp.

Here is the call graph for this function:

◆ getNewDestination()

CTxDestination wallet::getNewDestination ( CWallet w,
OutputType  output_type 
)

Returns a new destination, of an specific type, from the wallet.

Definition at line 91 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetOldestKeyTimeInPool()

static int64_t wallet::GetOldestKeyTimeInPool ( const std::set< int64_t > &  setKeyPool,
WalletBatch batch 
)
static

Definition at line 538 of file scriptpubkeyman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetOutputType()

static OutputType wallet::GetOutputType ( TxoutType  type,
bool  is_from_p2sh 
)
static

Definition at line 243 of file spend.cpp.

Here is the caller graph for this function:

◆ getrawchangeaddress()

RPCHelpMan wallet::getrawchangeaddress ( )

Definition at line 73 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReceived()

static CAmount wallet::GetReceived ( const CWallet wallet,
const UniValue params,
bool  by_label 
)
static

Definition at line 21 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getreceivedbyaddress()

RPCHelpMan wallet::getreceivedbyaddress ( )

Definition at line 81 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getreceivedbylabel()

RPCHelpMan wallet::getreceivedbylabel ( )

Definition at line 122 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRequiredFee()

CAmount wallet::GetRequiredFee ( const CWallet wallet,
unsigned int  nTxBytes 
)

Return the minimum required absolute fee for this size based on the required fee rate.

Definition at line 13 of file fees.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRequiredFeeRate()

CFeeRate wallet::GetRequiredFeeRate ( const CWallet wallet)

Return the minimum required feerate taking into account the minimum relay feerate and user set minimum transaction feerate.

Definition at line 24 of file fees.cpp.

Here is the caller graph for this function:

◆ GetSerializeSizeForRecipient()

size_t wallet::GetSerializeSizeForRecipient ( const CRecipient recipient)

Definition at line 995 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSignedTxinWeight()

static std::optional<int64_t> wallet::GetSignedTxinWeight ( const CWallet wallet,
const CCoinControl coin_control,
const CTxIn txin,
const CTxOut txo,
const bool  tx_is_segwit,
const bool  can_grind_r 
)
static

Infer the maximum size of this input after it will be signed.

Definition at line 119 of file spend.cpp.

Here is the call graph for this function:

◆ gettransaction()

RPCHelpMan wallet::gettransaction ( )

Definition at line 694 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getunconfirmedbalance()

RPCHelpMan wallet::getunconfirmedbalance ( )

Definition at line 215 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWallet()

std::shared_ptr< CWallet > wallet::GetWallet ( WalletContext context,
const std::string &  name 
)

Definition at line 195 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetWalletAddressesForKey()

static bool wallet::GetWalletAddressesForKey ( const LegacyScriptPubKeyMan spk_man,
const CWallet wallet,
const CKeyID keyid,
std::string &  strAddr,
std::string &  strLabel 
)
static

Definition at line 66 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletDir()

fs::path wallet::GetWalletDir ( )

Get the path of the wallet directory.

Definition at line 13 of file walletutil.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletEnv()

static std::shared_ptr<BerkeleyEnvironment> wallet::GetWalletEnv ( const fs::path path,
fs::path database_filename 
)
static

Definition at line 65 of file db_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletForJSONRPCRequest()

std::shared_ptr< CWallet > wallet::GetWalletForJSONRPCRequest ( const JSONRPCRequest request)

Figures out what wallet, if any, to use for a JSONRPCRequest.

Parameters
[in]requestJSONRPCRequest that wishes to access a wallet
Returns
nullptr if no wallet should be used, or a pointer to the CWallet

Definition at line 73 of file util.cpp.

Here is the call graph for this function:

◆ getwalletinfo()

static RPCHelpMan wallet::getwalletinfo ( )
static

Definition at line 42 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletNameFromJSONRPCRequest()

bool wallet::GetWalletNameFromJSONRPCRequest ( const JSONRPCRequest request,
std::string &  wallet_name 
)

Definition at line 63 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletPath()

static util::Result<fs::path> wallet::GetWalletPath ( const std::string &  name)
static

Definition at line 2932 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletRPCCommands()

Span< const CRPCCommand > wallet::GetWalletRPCCommands ( )

Definition at line 1101 of file wallet.cpp.

◆ GetWallets()

std::vector< std::shared_ptr< CWallet > > wallet::GetWallets ( WalletContext context)

Definition at line 182 of file wallet.cpp.

Here is the caller graph for this function:

◆ GroupCoins() [1/2]

std::vector<OutputGroup>& wallet::GroupCoins ( const std::vector< COutput > &  available_coins,
bool  subtract_fee_outputs = false 
)
inline

Definition at line 148 of file coinselector_tests.cpp.

Here is the caller graph for this function:

◆ GroupCoins() [2/2]

static void wallet::GroupCoins ( FuzzedDataProvider fuzzed_data_provider,
const std::vector< COutput > &  coins,
const CoinSelectionParams coin_params,
bool  positive_only,
std::vector< OutputGroup > &  output_groups 
)
static

Definition at line 29 of file coinselection.cpp.

Here is the call graph for this function:

◆ GroupOutputs() [1/2]

FilteredOutputGroups wallet::GroupOutputs ( const CWallet wallet,
const CoinsResult coins,
const CoinSelectionParams params,
const std::vector< SelectionFilter > &  filters 
)

Group coins by the provided filters.

Definition at line 646 of file spend.cpp.

Here is the caller graph for this function:

◆ GroupOutputs() [2/2]

FilteredOutputGroups wallet::GroupOutputs ( const CWallet wallet,
const CoinsResult coins,
const CoinSelectionParams coin_sel_params,
const std::vector< SelectionFilter > &  filters,
std::vector< OutputGroup > &  ret_discarded_groups 
)

Definition at line 528 of file spend.cpp.

Here is the caller graph for this function:

◆ GUARDED_BY() [1/2]

static std::set<std::string> g_loading_wallet_set wallet::GUARDED_BY ( g_loading_wallet_mutex  )
static

◆ GUARDED_BY() [2/2]

static std::set<std::string> g_unloading_wallet_set wallet::GUARDED_BY ( g_wallet_release_mutex  )
static

◆ HandleLoadWallet()

std::unique_ptr< interfaces::Handler > wallet::HandleLoadWallet ( WalletContext context,
LoadWalletFn  load_wallet 
)

Definition at line 204 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleWalletError()

void wallet::HandleWalletError ( const std::shared_ptr< CWallet wallet,
DatabaseStatus status,
bilingual_str error 
)

Definition at line 155 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_coin()

static bool wallet::has_coin ( const CoinSet set,
CAmount  amount 
)
static

Definition at line 1413 of file coinselector_tests.cpp.

Here is the caller graph for this function:

◆ HasAnyRecordOfType()

bool wallet::HasAnyRecordOfType ( WalletDatabase db,
const std::string &  key 
)

Definition at line 86 of file walletload_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasErrorMsg() [1/2]

static bool wallet::HasErrorMsg ( const util::Result< SelectionResult > &  res)
static

Definition at line 656 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasErrorMsg() [2/2]

static bool wallet::HasErrorMsg ( const util::Result< SelectionResult > &  res)
static

Definition at line 79 of file coinselection.cpp.

Here is the call graph for this function:

◆ HaveKey()

bool wallet::HaveKey ( const SigningProvider wallet,
const CKey key 
)

Checks if a CKey is in the given CWallet compressed or otherwise.

Definition at line 35 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ import_descriptor()

static void wallet::import_descriptor ( CWallet wallet,
const std::string &  descriptor 
)
static

Definition at line 18 of file psbt_wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importaddress()

RPCHelpMan wallet::importaddress ( )

Definition at line 219 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importdescriptors()

RPCHelpMan wallet::importdescriptors ( )

Definition at line 1577 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importmulti()

RPCHelpMan wallet::importmulti ( )

Definition at line 1236 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importprivkey()

RPCHelpMan wallet::importprivkey ( )

Definition at line 116 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importprunedfunds()

RPCHelpMan wallet::importprunedfunds ( )

Definition at line 321 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importpubkey()

RPCHelpMan wallet::importpubkey ( )

Definition at line 409 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ importwallet()

RPCHelpMan wallet::importwallet ( )

Definition at line 488 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InputIsMine()

isminetype wallet::InputIsMine ( const CWallet wallet,
const CTxIn txin 
)

Definition at line 12 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InterpretFeeEstimationInstructions()

static void wallet::InterpretFeeEstimationInstructions ( const UniValue conf_target,
const UniValue estimate_mode,
const UniValue fee_rate,
UniValue options 
)
static

Definition at line 45 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InterpretSubtractFeeFromOutputInstructions()

std::set<int> wallet::InterpretSubtractFeeFromOutputInstructions ( const UniValue sffo_instructions,
const std::vector< std::string > &  destinations 
)

Definition at line 67 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBDBFile()

bool wallet::IsBDBFile ( const fs::path path)

Definition at line 86 of file db.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCurrentForAntiFeeSniping()

static bool wallet::IsCurrentForAntiFeeSniping ( interfaces::Chain chain,
const uint256 block_hash 
)
static

Definition at line 921 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsDust()

bool wallet::IsDust ( const CRecipient recipient,
const CFeeRate dustRelayFee 
)

Definition at line 1000 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFeatureSupported()

bool wallet::IsFeatureSupported ( int  wallet_version,
int  feature_version 
)

Definition at line 35 of file walletutil.cpp.

Here is the caller graph for this function:

◆ IsSegwit()

static bool wallet::IsSegwit ( const Descriptor desc)
static

Whether the descriptor represents, directly or not, a witness program.

Definition at line 42 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsSQLiteFile()

bool wallet::IsSQLiteFile ( const fs::path path)

Definition at line 111 of file db.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ keypoolrefill()

RPCHelpMan wallet::keypoolrefill ( )

Definition at line 336 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ KnapsackGroupOutputs()

std::vector<OutputGroup>& wallet::KnapsackGroupOutputs ( const CoinsResult available_coins,
CWallet wallet,
const CoinEligibilityFilter filter 
)
inline

Definition at line 161 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ KnapsackSolver() [1/2]

std::optional<SelectionResult> wallet::KnapsackSolver ( std::vector< OutputGroup > &  groups,
const CAmount nTargetValue,
CAmount  change_target,
FastRandomContext rng 
)

Definition at line 94 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ KnapsackSolver() [2/2]

util::Result< SelectionResult > wallet::KnapsackSolver ( std::vector< OutputGroup > &  groups,
const CAmount nTargetValue,
CAmount  change_target,
FastRandomContext rng,
int  max_selection_weight 
)

Definition at line 653 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LabelFromValue()

std::string wallet::LabelFromValue ( const UniValue value)

Definition at line 135 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listaddressgroupings()

RPCHelpMan wallet::listaddressgroupings ( )

Definition at line 158 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListCoins()

std::map< CTxDestination, std::vector< COutput > > wallet::ListCoins ( const CWallet wallet)

Return list of available coins and locked coins grouped by non-change output address.

Definition at line 499 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListDatabases()

std::vector< fs::path > wallet::ListDatabases ( const fs::path wallet_dir)

Recursively list database paths in directory.

Definition at line 22 of file db.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listdescriptors()

RPCHelpMan wallet::listdescriptors ( )

Definition at line 1734 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listlabels()

RPCHelpMan wallet::listlabels ( )

Definition at line 725 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listlockunspent()

RPCHelpMan wallet::listlockunspent ( )

Definition at line 374 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListReceived()

static UniValue wallet::ListReceived ( const CWallet wallet,
const UniValue params,
const bool  by_label,
const bool  include_immature_coinbase 
)
static

Definition at line 74 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listreceivedbyaddress()

RPCHelpMan wallet::listreceivedbyaddress ( )

Definition at line 205 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listreceivedbylabel()

RPCHelpMan wallet::listreceivedbylabel ( )

Definition at line 258 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listsinceblock()

RPCHelpMan wallet::listsinceblock ( )

Definition at line 549 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listtransactions()

RPCHelpMan wallet::listtransactions ( )

Definition at line 440 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListTransactions()

template<class Vec >
static void wallet::ListTransactions ( const CWallet wallet,
const CWalletTx wtx,
int  nMinDepth,
bool  fLong,
Vec &  ret,
const isminefilter filter_ismine,
const std::optional< std::string > &  filter_label,
bool  include_change = false 
)
static

List transactions based on the given criteria.

Parameters
walletThe wallet.
wtxThe wallet transaction.
nMinDepthThe minimum confirmation depth.
fLongWhether to include the JSON version of the transaction.
retThe vector into which the result is stored.
filter_ismineThe "is mine" filter flags.
filter_labelOptional label string to filter incoming transactions.

Definition at line 322 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listunspent()

RPCHelpMan wallet::listunspent ( )

Definition at line 497 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listwalletdir()

static RPCHelpMan wallet::listwalletdir ( )
static

Definition at line 148 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listwallets()

static RPCHelpMan wallet::listwallets ( )
static

Definition at line 185 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadActiveSPKMs()

static DBErrors wallet::LoadActiveSPKMs ( CWallet pwallet,
DatabaseBatch batch 
) -> cs_wallet)
static

Definition at line 1105 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadAddressBookRecords()

static DBErrors wallet::LoadAddressBookRecords ( CWallet pwallet,
DatabaseBatch batch 
) -> cs_wallet)
static

Definition at line 956 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadCryptedKey()

bool wallet::LoadCryptedKey ( CWallet pwallet,
DataStream ssKey,
DataStream ssValue,
std::string &  strErr 
)

Definition at line 371 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadDecryptionKeys()

static DBErrors wallet::LoadDecryptionKeys ( CWallet pwallet,
DatabaseBatch batch 
) -> cs_wallet)
static

Definition at line 1134 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadDescriptorWalletRecords()

static DBErrors wallet::LoadDescriptorWalletRecords ( CWallet pwallet,
DatabaseBatch batch,
int  last_client 
) -> cs_wallet)
static

Definition at line 785 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadEncryptionKey()

bool wallet::LoadEncryptionKey ( CWallet pwallet,
DataStream ssKey,
DataStream ssValue,
std::string &  strErr 
)

Definition at line 410 of file walletdb.cpp.

Here is the caller graph for this function:

◆ LoadHDChain()

bool wallet::LoadHDChain ( CWallet pwallet,
DataStream ssValue,
std::string &  strErr 
)

Definition at line 437 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadKey()

bool wallet::LoadKey ( CWallet pwallet,
DataStream ssKey,
DataStream ssValue,
std::string &  strErr 
)

Definition at line 305 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadLegacyWalletRecords()

static DBErrors wallet::LoadLegacyWalletRecords ( CWallet pwallet,
DatabaseBatch batch,
int  last_client 
) -> cs_wallet)
static

Definition at line 529 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadMinVersion()

static DBErrors wallet::LoadMinVersion ( CWallet pwallet,
DatabaseBatch batch 
) -> cs_wallet)
static

Definition at line 453 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadRecords() [1/2]

static LoadResult wallet::LoadRecords ( CWallet pwallet,
DatabaseBatch batch,
const std::string &  key,
DataStream prefix,
LoadFunc  load_func 
)
static

Definition at line 485 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadRecords() [2/2]

static LoadResult wallet::LoadRecords ( CWallet pwallet,
DatabaseBatch batch,
const std::string &  key,
LoadFunc  load_func 
)
static

Definition at line 522 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadTxRecords()

static DBErrors wallet::LoadTxRecords ( CWallet pwallet,
DatabaseBatch batch,
std::vector< uint256 > &  upgraded_txs,
bool &  any_unordered 
) -> cs_wallet)
static

Definition at line 1017 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadwallet()

static RPCHelpMan wallet::loadwallet ( )
static

Definition at line 216 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadWallet()

std::shared_ptr< CWallet > wallet::LoadWallet ( WalletContext context,
const std::string &  name,
std::optional< bool >  load_on_start,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)

Definition at line 364 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadWalletFlags()

static DBErrors wallet::LoadWalletFlags ( CWallet pwallet,
DatabaseBatch batch 
) -> cs_wallet)
static

Definition at line 465 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadWallets()

bool wallet::LoadWallets ( WalletContext context)

Load wallet databases.

Definition at line 107 of file load.cpp.

Here is the call graph for this function:

◆ lockunspent()

RPCHelpMan wallet::lockunspent ( )

Definition at line 238 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_hard_case()

static CAmount wallet::make_hard_case ( int  utxos,
std::vector< COutput > &  utxo_pool 
)
static

Definition at line 136 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeBerkeleyDatabase()

std::unique_ptr< BerkeleyDatabase > wallet::MakeBerkeleyDatabase ( const fs::path path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Return object giving access to Berkeley database at specified path.

Definition at line 948 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeBerkeleyRODatabase()

std::unique_ptr< BerkeleyRODatabase > wallet::MakeBerkeleyRODatabase ( const fs::path path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Return object giving access to Berkeley Read Only database at specified path.

Definition at line 771 of file migrate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeDatabase()

std::unique_ptr< WalletDatabase > wallet::MakeDatabase ( const fs::path path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Definition at line 1349 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSelectionParams()

CoinSelectionParams wallet::makeSelectionParams ( FastRandomContext rand,
bool  avoid_partial_spends 
)

Definition at line 62 of file group_outputs_tests.cpp.

Here is the caller graph for this function:

◆ MakeSerializeData()

template<typename... Args>
SerializeData wallet::MakeSerializeData ( const Args &...  args)

Definition at line 106 of file walletload_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeSQLiteDatabase()

std::unique_ptr< SQLiteDatabase > wallet::MakeSQLiteDatabase ( const fs::path path,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error 
)

Definition at line 694 of file sqlite.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeWalletDatabase()

std::unique_ptr< WalletDatabase > wallet::MakeWalletDatabase ( const std::string &  name,
const DatabaseOptions options,
DatabaseStatus status,
bilingual_str error_string 
)

Definition at line 2954 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ malformed_descriptor()

bool wallet::malformed_descriptor ( std::ios_base::failure  e)

Definition at line 747 of file wallet_tests.cpp.

Here is the caller graph for this function:

◆ ManualSelection()

static SelectionResult wallet::ManualSelection ( std::vector< COutput > &  utxos,
const CAmount total_amount,
const bool &  subtract_fee_outputs 
)
static

Definition at line 67 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaxInputWeight()

static std::optional<int64_t> wallet::MaxInputWeight ( const Descriptor desc,
const std::optional< CTxIn > &  txin,
const CCoinControl coin_control,
const bool  tx_is_segwit,
const bool  can_grind_r 
)
static

Get the size of an input (in witness units) once it's signed.

Parameters
descThe output script descriptor of the coin spent by this input.
txinOptionally the txin to estimate the size of. Used to determine the size of ECDSA signatures.
coin_controlInformation about the context to determine the size of ECDSA signatures.
tx_is_segwitWhether the transaction has at least a single input spending a segwit coin.
can_grind_rWhether the signer will be able to grind the R of the signature.

Definition at line 62 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaybeCompactWalletDB()

void wallet::MaybeCompactWalletDB ( WalletContext context)

Compacts BDB state so that wallet.dat is self-contained (if there are changes)

Definition at line 1265 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaybePushAddress()

static void wallet::MaybePushAddress ( UniValue entry,
const CTxDestination dest 
)
static

Definition at line 303 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaybeResendWalletTxs()

void wallet::MaybeResendWalletTxs ( WalletContext context)

Called periodically by the schedule thread.

Prompts individual wallets to resend their transactions. Actual rebroadcast schedule is managed by the wallets themselves.

Definition at line 2132 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MigrateLegacyToDescriptor()

util::Result< MigrationResult > wallet::MigrateLegacyToDescriptor ( const std::string &  wallet_name,
const SecureString passphrase,
WalletContext context 
)

Do all steps to migrate a legacy wallet to a descriptor wallet.

Definition at line 4374 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ migratewallet()

static RPCHelpMan wallet::migratewallet ( )
static

Definition at line 750 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newkeypool()

RPCHelpMan wallet::newkeypool ( )

Definition at line 380 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NewWallet() [1/2]

static std::shared_ptr<CWallet> wallet::NewWallet ( const node::NodeContext m_node)
static

Definition at line 19 of file group_outputs_tests.cpp.

Here is the call graph for this function:

◆ NewWallet() [2/2]

static std::unique_ptr<CWallet> wallet::NewWallet ( const node::NodeContext m_node,
const std::string &  wallet_name = "" 
)
static

Definition at line 180 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NotifyWalletLoaded()

void wallet::NotifyWalletLoaded ( WalletContext context,
const std::shared_ptr< CWallet > &  wallet 
)

Definition at line 211 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<() [1/2]

bool wallet::operator< ( BytePrefix  a,
Span< const std::byte >  b 
)

Definition at line 19 of file db.cpp.

Here is the call graph for this function:

◆ operator<() [2/2]

bool wallet::operator< ( Span< const std::byte >  a,
BytePrefix  b 
)

Definition at line 20 of file db.cpp.

Here is the call graph for this function:

◆ OutputGetChange()

CAmount wallet::OutputGetChange ( const CWallet wallet,
const CTxOut txout 
)

Definition at line 78 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputGetCredit()

CAmount wallet::OutputGetCredit ( const CWallet wallet,
const CTxOut txout,
const isminefilter filter 
)

Definition at line 31 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputIsChange()

bool wallet::OutputIsChange ( const CWallet wallet,
const CTxOut txout 
)

Definition at line 73 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OutputsDoc()

static std::vector<RPCArg> wallet::OutputsDoc ( )
static

Definition at line 967 of file spend.cpp.

Here is the caller graph for this function:

◆ ParseIncludeWatchonly()

bool wallet::ParseIncludeWatchonly ( const UniValue include_watchonly,
const CWallet wallet 
)

Used by RPC commands that have an include_watchonly parameter.

We default to true for watchonly wallets if include_watchonly isn't explicitly set.

Definition at line 52 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseISO8601DateTime()

int64_t wallet::ParseISO8601DateTime ( const std::string &  str)

Definition at line 23 of file util.cpp.

Here is the caller graph for this function:

◆ PollutePubKey()

static void wallet::PollutePubKey ( CPubKey pubkey)
static

Definition at line 500 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PreconditionChecks()

static feebumper::Result wallet::PreconditionChecks ( const CWallet wallet,
const CWalletTx wtx,
bool  require_mine,
std::vector< bilingual_str > &  errors 
)
static

Check whether transaction has descendant in wallet or mempool, or has been mined, or conflicts with a mined transaction.

Return a feebumper::Result.

Definition at line 24 of file feebumper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrefixStream()

template<typename... Args>
static DataStream wallet::PrefixStream ( const Args &...  args)
static

Definition at line 778 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PreventOutdatedOptions()

static void wallet::PreventOutdatedOptions ( const UniValue options)
static

Definition at line 141 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessDescriptorImport()

static UniValue wallet::ProcessDescriptorImport ( CWallet wallet,
const UniValue data,
const int64_t  timestamp 
)
static

Definition at line 1437 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImport()

static UniValue wallet::ProcessImport ( CWallet wallet,
const UniValue data,
const int64_t  timestamp 
)
static

Definition at line 1146 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImportDescriptor()

static UniValue wallet::ProcessImportDescriptor ( ImportData import_data,
std::map< CKeyID, CPubKey > &  pubkey_map,
std::map< CKeyID, CKey > &  privkey_map,
std::set< CScript > &  script_pub_keys,
bool &  have_solving_data,
const UniValue data,
std::vector< CKeyID > &  ordered_pubkeys 
)
static

Definition at line 1057 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessImportLegacy()

static UniValue wallet::ProcessImportLegacy ( ImportData import_data,
std::map< CKeyID, CPubKey > &  pubkey_map,
std::map< CKeyID, CKey > &  privkey_map,
std::set< CScript > &  script_pub_keys,
bool &  have_solving_data,
const UniValue data,
std::vector< CKeyID > &  ordered_pubkeys 
)
static

Definition at line 918 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ psbtbumpfee()

RPCHelpMan wallet::psbtbumpfee ( )

Definition at line 1192 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PurposeFromString()

std::optional<AddressPurpose> wallet::PurposeFromString ( std::string_view  s)
inline

Definition at line 283 of file wallet.h.

Here is the caller graph for this function:

◆ PurposeToString()

std::string wallet::PurposeToString ( AddressPurpose  p)
inline

Definition at line 273 of file wallet.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PushParentDescriptors()

void wallet::PushParentDescriptors ( const CWallet wallet,
const CScript script_pubkey,
UniValue entry 
)

Fetch parent descriptors of this scriptPubKey.

Definition at line 146 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadDatabaseArgs()

void wallet::ReadDatabaseArgs ( const ArgsManager args,
DatabaseOptions options 
)

Definition at line 145 of file db.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadPragmaInteger()

static std::optional<int> wallet::ReadPragmaInteger ( sqlite3 *  db,
const std::string &  key,
const std::string &  description,
bilingual_str error 
)
static

Definition at line 81 of file sqlite.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecoverDatabaseFile()

bool wallet::RecoverDatabaseFile ( const ArgsManager args,
const fs::path file_path,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)

Salvage data from a file. The DB_AGGRESSIVE flag is being used (see berkeley DB->verify() method documentation). key/value pairs are appended to salvagedData which are then written out to a new wallet file. NOTE: reads the entire database into memory, so cannot be used for huge databases.

Definition at line 69 of file salvage.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RecurseImportData()

static std::string wallet::RecurseImportData ( const CScript script,
ImportData import_data,
const ScriptContext  script_ctx 
)
static

Definition at line 852 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshMempoolStatus()

static void wallet::RefreshMempoolStatus ( CWalletTx tx,
interfaces::Chain chain 
)
static

Refresh mempool status so the wallet is in an internally consistent state and immediately knows the transaction's status: Whether it can be considered trusted and is eligible to be abandoned ...

Definition at line 135 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReleaseWallet()

static void wallet::ReleaseWallet ( CWallet wallet)
static

Definition at line 226 of file wallet.cpp.

Here is the caller graph for this function:

◆ removeprunedfunds()

RPCHelpMan wallet::removeprunedfunds ( )

Definition at line 377 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveWallet() [1/2]

bool wallet::RemoveWallet ( WalletContext context,
const std::shared_ptr< CWallet > &  wallet,
std::optional< bool >  load_on_start 
)

Definition at line 176 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveWallet() [2/2]

bool wallet::RemoveWallet ( WalletContext context,
const std::shared_ptr< CWallet > &  wallet,
std::optional< bool >  load_on_start,
std::vector< bilingual_str > &  warnings 
)

Definition at line 156 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveWalletSetting()

bool wallet::RemoveWalletSetting ( interfaces::Chain chain,
const std::string &  wallet_name 
)

Remove wallet name from persistent configuration so it will not be loaded on startup.

Definition at line 105 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rescanblockchain()

RPCHelpMan wallet::rescanblockchain ( )

Definition at line 849 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RescanWallet()

static void wallet::RescanWallet ( CWallet wallet,
const WalletRescanReserver reserver,
int64_t  time_begin = TIMESTAMP_MIN,
bool  update = true 
)
static

Definition at line 90 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restorewallet()

RPCHelpMan wallet::restorewallet ( )

Definition at line 1881 of file backup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RestoreWallet()

std::shared_ptr< CWallet > wallet::RestoreWallet ( WalletContext context,
const fs::path backup_file,
const std::string &  wallet_name,
std::optional< bool >  load_on_start,
DatabaseStatus status,
bilingual_str error,
std::vector< bilingual_str > &  warnings 
)

Definition at line 487 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunWithinTxn() [1/2]

static bool wallet::RunWithinTxn ( WalletBatch batch,
std::string_view  process_desc,
const std::function< bool(WalletBatch &)> &  func 
)
static

Definition at line 1236 of file walletdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunWithinTxn() [2/2]

bool wallet::RunWithinTxn ( WalletDatabase database,
std::string_view  process_desc,
const std::function< bool(WalletBatch &)> &  func 
)

Executes the provided function 'func' within a database transaction context.

This function ensures that all db modifications performed within 'func()' are atomically committed to the db at the end of the process. And, in case of a failure during execution, all performed changes are rolled back.

Parameters
databaseThe db connection instance to perform the transaction on.
process_descA description of the process being executed, used for logging purposes in the event of a failure.
funcThe function to be executed within the db txn context. It returns a boolean indicating whether to commit or roll back the txn.
Returns
true if the db txn executed successfully, false otherwise.

Definition at line 1259 of file walletdb.cpp.

Here is the caller graph for this function:

◆ ScriptIsChange()

bool wallet::ScriptIsChange ( const CWallet wallet,
const CScript script 
)

Definition at line 51 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SeekToPage()

static void wallet::SeekToPage ( AutoFile s,
uint32_t  page_num,
uint32_t  page_size 
)
static

Definition at line 518 of file migrate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_coins()

static util::Result<SelectionResult> wallet::select_coins ( const CAmount target,
const CoinSelectionParams cs_params,
const CCoinControl cc,
std::function< CoinsResult(CWallet &)>  coin_setup,
const node::NodeContext m_node 
)
static

Definition at line 1397 of file coinselector_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectCoins()

util::Result< SelectionResult > wallet::SelectCoins ( const CWallet wallet,
CoinsResult available_coins,
const PreSelectedInputs pre_set_inputs,
const CAmount nTargetValue,
const CCoinControl coin_control,
const CoinSelectionParams coin_selection_params 
)

Select all coins from coin_control, and if coin_control 'm_allow_other_inputs=true', call 'AutomaticCoinSelection' to select a set of coins such that nTargetValue - pre_set_inputs.total_amount is met.

Definition at line 770 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectCoinsBnB() [1/2]

std::optional<SelectionResult> wallet::SelectCoinsBnB ( std::vector< OutputGroup > &  utxo_pool,
const CAmount selection_target,
const CAmount cost_of_change 
)

Definition at line 101 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ SelectCoinsBnB() [2/2]

util::Result< SelectionResult > wallet::SelectCoinsBnB ( std::vector< OutputGroup > &  utxo_pool,
const CAmount selection_target,
const CAmount cost_of_change,
int  max_selection_weight 
)

Definition at line 93 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectCoinsSRD() [1/2]

static util::Result<SelectionResult> wallet::SelectCoinsSRD ( const CAmount target,
const CoinSelectionParams cs_params,
const node::NodeContext m_node,
int  max_selection_weight,
std::function< CoinsResult(CWallet &)>  coin_setup 
)
static

Definition at line 1308 of file coinselector_tests.cpp.

Here is the call graph for this function:

◆ SelectCoinsSRD() [2/2]

util::Result< SelectionResult > wallet::SelectCoinsSRD ( const std::vector< OutputGroup > &  utxo_pool,
CAmount  target_value,
CAmount  change_fee,
FastRandomContext rng,
int  max_selection_weight 
)

Select coins by Single Random Draw.

OutputGroups are selected randomly from the eligible outputs until the target is satisfied

Parameters
[in]utxo_poolThe positive effective value OutputGroups eligible for selection
[in]target_valueThe target value to select for
[in]rngThe randomness source to shuffle coins
[in]max_selection_weightThe maximum allowed weight for a selection result to be valid
Returns
If successful, a valid SelectionResult, otherwise, util::Error

Definition at line 537 of file coinselection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send()

RPCHelpMan wallet::send ( )

Definition at line 1194 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendall()

RPCHelpMan wallet::sendall ( )

Definition at line 1313 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendmany()

RPCHelpMan wallet::sendmany ( )

Definition at line 324 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendMoney()

UniValue wallet::SendMoney ( CWallet wallet,
const CCoinControl coin_control,
std::vector< CRecipient > &  recipients,
mapValue_t  map_value,
bool  verbose 
)

Definition at line 163 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendtoaddress()

RPCHelpMan wallet::sendtoaddress ( )

Definition at line 230 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetFeeEstimateMode()

static void wallet::SetFeeEstimateMode ( const CWallet wallet,
CCoinControl cc,
const UniValue conf_target,
const UniValue estimate_mode,
const UniValue fee_rate,
bool  override_min_fee 
)
static

Update coin control with fee estimation based on the given parameters.

Parameters
[in]walletWallet reference
[in,out]ccCoin control to be updated
[in]conf_targetUniValue integer; confirmation target in blocks, values between 1 and 1008 are valid per policy/fees.h;
[in]estimate_modeUniValue string; fee estimation mode, valid values are "unset", "economical" or "conservative";
[in]fee_rateUniValue real; fee rate in sat/vB; if present, both conf_target and estimate_mode must either be null, or "unset"
[in]override_min_feebool; whether to set fOverrideFeeRate to true to disable minimum fee rate checks and instead verify only that fee_rate is greater than 0
Exceptions
aJSONRPCError if conf_target, estimate_mode, or fee_rate contain invalid values or are in conflict

Definition at line 206 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sethdseed()

static RPCHelpMan wallet::sethdseed ( )
static

Definition at line 508 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setlabel()

RPCHelpMan wallet::setlabel ( )

Definition at line 120 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetOptionsInputWeights()

static void wallet::SetOptionsInputWeights ( const UniValue inputs,
UniValue options 
)
static

Definition at line 719 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPragma()

static void wallet::SetPragma ( sqlite3 *  db,
const std::string &  key,
const std::string &  value,
const std::string &  err_msg 
)
static

Definition at line 102 of file sqlite.cpp.

Here is the caller graph for this function:

◆ settxfee()

RPCHelpMan wallet::settxfee ( )

Definition at line 418 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setwalletflag()

static RPCHelpMan wallet::setwalletflag ( )
static

Definition at line 273 of file wallet.cpp.

Here is the caller graph for this function:

◆ signmessage()

RPCHelpMan wallet::signmessage ( )

Definition at line 14 of file signmessage.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signrawtransactionwithwallet()

RPCHelpMan wallet::signrawtransactionwithwallet ( )

Definition at line 870 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simulaterawtransaction()

RPCHelpMan wallet::simulaterawtransaction ( )

Definition at line 641 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpanFromBlob()

static Span<const std::byte> wallet::SpanFromBlob ( sqlite3_stmt *  stmt,
int  col 
)
static

Definition at line 29 of file sqlite.cpp.

Here is the caller graph for this function:

◆ SpanFromDbt()

static Span<const std::byte> wallet::SpanFromDbt ( const SafeDbt dbt)
static

Definition at line 299 of file bdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SQLiteDatabaseVersion()

std::string wallet::SQLiteDatabaseVersion ( )

Definition at line 712 of file sqlite.cpp.

Here is the caller graph for this function:

◆ SQLiteDataFile()

fs::path wallet::SQLiteDataFile ( const fs::path path)

Definition at line 81 of file db.cpp.

Here is the caller graph for this function:

◆ StartWallets()

void wallet::StartWallets ( WalletContext context)

Complete startup of wallets.

Definition at line 146 of file load.cpp.

Here is the call graph for this function:

◆ StopWallets()

void wallet::StopWallets ( WalletContext context)

Stop all wallets. Wallets will be flushed first.

Definition at line 166 of file load.cpp.

Here is the call graph for this function:

◆ StringBytes()

static Span<const std::byte> wallet::StringBytes ( std::string_view  str)
static

Definition at line 37 of file db_tests.cpp.

Here is the caller graph for this function:

◆ StringData()

static SerializeData wallet::StringData ( std::string_view  str)
static

Definition at line 42 of file db_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestCoinsResult()

void wallet::TestCoinsResult ( ListCoinsTest &  context,
OutputType  out_type,
CAmount  amount,
std::map< OutputType, size_t > &  expected_coins_sizes 
)

Definition at line 645 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestDatabases()

static std::vector<std::unique_ptr<WalletDatabase> > wallet::TestDatabases ( const fs::path path_root)
static

Definition at line 128 of file db_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestLoadWallet() [1/3]

void wallet::TestLoadWallet ( const std::string &  name,
DatabaseFormat  format,
std::function< void(std::shared_ptr< CWallet >)>  f 
)

Definition at line 412 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestLoadWallet() [2/3]

std::shared_ptr< CWallet > wallet::TestLoadWallet ( std::unique_ptr< WalletDatabase database,
WalletContext context,
uint64_t  create_flags 
)

Definition at line 49 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestLoadWallet() [3/3]

std::shared_ptr< CWallet > wallet::TestLoadWallet ( WalletContext context)

Definition at line 61 of file util.cpp.

Here is the call graph for this function:

◆ TestSimpleSpend()

static CMutableTransaction wallet::TestSimpleSpend ( const CTransaction from,
uint32_t  index,
const CKey key,
const CScript pubkey 
)
static

Definition at line 49 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestUnloadWallet()

void wallet::TestUnloadWallet ( std::shared_ptr< CWallet > &&  wallet)

Definition at line 72 of file util.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestWatchOnlyPubKey()

static void wallet::TestWatchOnlyPubKey ( LegacyScriptPubKeyMan spk_man,
const CPubKey add_pubkey 
)
static

Definition at line 468 of file wallet_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TraceSqlCallback()

static int wallet::TraceSqlCallback ( unsigned  code,
void *  context,
void *  param1,
void *  param2 
)
static

Definition at line 46 of file sqlite.cpp.

Here is the caller graph for this function:

◆ TransactionDescriptionString()

static std::vector<RPCResult> wallet::TransactionDescriptionString ( )
static

Definition at line 405 of file transactions.cpp.

Here is the caller graph for this function:

◆ TxGetChange()

CAmount wallet::TxGetChange ( const CWallet wallet,
const CTransaction tx 
)

Definition at line 86 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TxGetCredit()

CAmount wallet::TxGetCredit ( const CWallet wallet,
const CTransaction tx,
const isminefilter filter 
)

Definition at line 39 of file receive.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TxStateInterpretSerialized()

static TxState wallet::TxStateInterpretSerialized ( TxStateUnrecognized  data)
inlinestatic

Try to interpret deserialized TxStateUnrecognized data as a recognized state.

Definition at line 84 of file transaction.h.

Here is the caller graph for this function:

◆ TxStateSerializedBlockHash()

static uint256 wallet::TxStateSerializedBlockHash ( const TxState state)
inlinestatic

Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.

Definition at line 99 of file transaction.h.

Here is the caller graph for this function:

◆ TxStateSerializedIndex()

static int wallet::TxStateSerializedIndex ( const TxState state)
inlinestatic

Get TxState serialized block index. Inverse of TxStateInterpretSerialized.

Definition at line 111 of file transaction.h.

Here is the caller graph for this function:

◆ TxStateString()

template<typename T >
std::string wallet::TxStateString ( const T &  state)

Return TxState or SyncTxState as a string for logging or debugging.

Definition at line 124 of file transaction.h.

Here is the caller graph for this function:

◆ unloadwallet()

static RPCHelpMan wallet::unloadwallet ( )
static

Definition at line 446 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnloadWallet()

void wallet::UnloadWallet ( std::shared_ptr< CWallet > &&  wallet)

Explicitly unload and delete the wallet.

Blocks the current thread after signaling the unload intent so that all wallet pointer owners release the wallet. Note that, when blocking is not required, the wallet is implicitly unloaded by the shared pointer deleter.

Definition at line 243 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnloadWallets()

void wallet::UnloadWallets ( WalletContext context)

Close all wallets.

Definition at line 173 of file load.cpp.

Here is the call graph for this function:

◆ UpdateWalletSetting()

static void wallet::UpdateWalletSetting ( interfaces::Chain chain,
const std::string &  wallet_name,
std::optional< bool >  load_on_startup,
std::vector< bilingual_str > &  warnings 
)
static

Definition at line 117 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ upgradewallet()

static RPCHelpMan wallet::upgradewallet ( )
static

Definition at line 579 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UseMaxSig()

static bool wallet::UseMaxSig ( const std::optional< CTxIn > &  txin,
const CCoinControl coin_control 
)
static

Whether to assume ECDSA signatures' will be high-r.

Definition at line 48 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerifyWallets()

bool wallet::VerifyWallets ( WalletContext context)

Responsible for reading and validating the -wallet arguments and verifying the wallet database.

Definition at line 27 of file load.cpp.

Here is the call graph for this function:

◆ WalletBalance()

static void wallet::WalletBalance ( benchmark::Bench bench,
const bool  set_dirty,
const bool  add_mine 
)
static

Definition at line 19 of file wallet_balance.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletBalanceClean()

static void wallet::WalletBalanceClean ( benchmark::Bench bench)
static

Definition at line 55 of file wallet_balance.cpp.

Here is the call graph for this function:

◆ WalletBalanceDirty()

static void wallet::WalletBalanceDirty ( benchmark::Bench bench)
static

Definition at line 54 of file wallet_balance.cpp.

Here is the call graph for this function:

◆ WalletBalanceMine()

static void wallet::WalletBalanceMine ( benchmark::Bench bench)
static

Definition at line 56 of file wallet_balance.cpp.

Here is the call graph for this function:

◆ WalletBalanceWatch()

static void wallet::WalletBalanceWatch ( benchmark::Bench bench)
static

Definition at line 57 of file wallet_balance.cpp.

Here is the call graph for this function:

◆ WalletCreate()

static void wallet::WalletCreate ( benchmark::Bench bench,
bool  encrypted 
)
static

Definition at line 15 of file wallet_create.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletCreateEncrypted()

static void wallet::WalletCreateEncrypted ( benchmark::Bench bench)
static

Definition at line 51 of file wallet_create.cpp.

Here is the call graph for this function:

◆ walletcreatefundedpsbt()

RPCHelpMan wallet::walletcreatefundedpsbt ( )

Definition at line 1656 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletCreatePlain()

static void wallet::WalletCreatePlain ( benchmark::Bench bench)
static

Definition at line 50 of file wallet_create.cpp.

Here is the call graph for this function:

◆ walletdisplayaddress()

RPCHelpMan wallet::walletdisplayaddress ( )

Definition at line 781 of file addresses.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletIsMine()

static void wallet::WalletIsMine ( benchmark::Bench bench,
bool  legacy_wallet,
int  num_combo = 0 
)
static

Definition at line 20 of file wallet_ismine.cpp.

Here is the call graph for this function:

◆ WalletLoading()

static void wallet::WalletLoading ( benchmark::Bench bench,
bool  legacy_wallet 
)
static

Definition at line 31 of file wallet_loading.cpp.

Here is the call graph for this function:

◆ walletlock()

RPCHelpMan wallet::walletlock ( )

Definition at line 174 of file encrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletpassphrase()

RPCHelpMan wallet::walletpassphrase ( )

Definition at line 11 of file encrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletpassphrasechange()

RPCHelpMan wallet::walletpassphrasechange ( )

Definition at line 115 of file encrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletprocesspsbt()

RPCHelpMan wallet::walletprocesspsbt ( )

Definition at line 1573 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletToolReleaseWallet()

static void wallet::WalletToolReleaseWallet ( CWallet wallet)
static

Definition at line 115 of file dump.cpp.

Here is the caller graph for this function:

◆ WalletTxToJSON()

static void wallet::WalletTxToJSON ( const CWallet wallet,
const CWalletTx wtx,
UniValue entry 
)
static

Definition at line 17 of file transactions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ADDRESS_BCRT1_UNSPENDABLE

const std::string wallet::ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj"

Definition at line 37 of file util.h.

◆ BIP32_HARDENED_KEY_LIMIT

const uint32_t wallet::BIP32_HARDENED_KEY_LIMIT = 0x80000000

Value for the first BIP 32 hardened derivation. Can be used as a bit mask and as a value. See BIP 32 for more details.

Definition at line 29 of file scriptpubkeyman.cpp.

◆ BTREE_MAGIC

constexpr uint32_t wallet::BTREE_MAGIC = 0x00053162
constexpr

Definition at line 16 of file migrate.cpp.

◆ BTREE_MAGIC_OE

constexpr uint32_t wallet::BTREE_MAGIC_OE = 0x62310500
constexpr

Definition at line 17 of file migrate.cpp.

◆ CHANGE_LOWER

constexpr CAmount wallet::CHANGE_LOWER {50000}
staticconstexpr

lower bound for randomly-chosen target change amount

Definition at line 23 of file coinselection.h.

◆ CHANGE_UPPER

constexpr CAmount wallet::CHANGE_UPPER {1000000}
staticconstexpr

upper bound for randomly-chosen target change amount

Definition at line 25 of file coinselection.h.

◆ DATA_END

const char* wallet::DATA_END = "DATA=END"
static

Definition at line 20 of file salvage.cpp.

◆ DATABASE_FORMATS

const DatabaseFormat wallet::DATABASE_FORMATS[]
static
Initial value:
= {
}

Definition at line 28 of file util.h.

◆ DEFAULT_ADDRESS_TYPE

constexpr OutputType wallet::DEFAULT_ADDRESS_TYPE {OutputType::BECH32}
constexpr

Default for -addresstype.

Definition at line 151 of file wallet.h.

◆ DEFAULT_AVOIDPARTIALSPENDS

constexpr bool wallet::DEFAULT_AVOIDPARTIALSPENDS = false
staticconstexpr

Default for -avoidpartialspends.

Definition at line 25 of file coincontrol.h.

◆ DEFAULT_CONSOLIDATE_FEERATE

const CAmount wallet::DEFAULT_CONSOLIDATE_FEERATE {10000}
static

-consolidatefeerate default

Definition at line 115 of file wallet.h.

◆ DEFAULT_DISABLE_WALLET

const bool wallet::DEFAULT_DISABLE_WALLET = false
static

Definition at line 137 of file wallet.h.

◆ DEFAULT_DISCARD_FEE

const CAmount wallet::DEFAULT_DISCARD_FEE = 10000
static

-discardfee default

Definition at line 111 of file wallet.h.

◆ DEFAULT_FALLBACK_FEE

const CAmount wallet::DEFAULT_FALLBACK_FEE = 0
static

-fallbackfee default

Definition at line 109 of file wallet.h.

◆ DEFAULT_FLUSHWALLET

const bool wallet::DEFAULT_FLUSHWALLET = true
static

Overview of wallet database classes:

  • WalletBatch is an abstract modifier object for the wallet database, and encapsulates a database batch update as well as methods to act on the database. It should be agnostic to the database implementation.

The following classes are implementation specific:

Definition at line 42 of file walletdb.h.

◆ DEFAULT_KEYPOOL_SIZE

const unsigned int wallet::DEFAULT_KEYPOOL_SIZE = 1000
static

Default for -keypool.

Definition at line 64 of file scriptpubkeyman.h.

◆ DEFAULT_MAX_AVOIDPARTIALSPEND_FEE

const CAmount wallet::DEFAULT_MAX_AVOIDPARTIALSPEND_FEE = 0
static

maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled by default

A value of -1 disables this feature completely. A value of 0 (current default) means to attempt to do partial spend avoidance, and use its results if the fees remain unchanged A value > 0 means to do partial spend avoidance if the fee difference against a regular coin selection instance is in the range [0..value].

Definition at line 123 of file wallet.h.

◆ DEFAULT_MAX_DEPTH

const int wallet::DEFAULT_MAX_DEPTH = 9999999

Definition at line 22 of file coincontrol.h.

◆ DEFAULT_MIN_DEPTH

const int wallet::DEFAULT_MIN_DEPTH = 0

Definition at line 21 of file coincontrol.h.

◆ DEFAULT_PAY_TX_FEE

constexpr CAmount wallet::DEFAULT_PAY_TX_FEE = 0
constexpr

-paytxfee default

Definition at line 107 of file wallet.h.

◆ DEFAULT_SPEND_ZEROCONF_CHANGE

const bool wallet::DEFAULT_SPEND_ZEROCONF_CHANGE = true
static

Default for -spendzeroconfchange.

Definition at line 129 of file wallet.h.

◆ DEFAULT_TRANSACTION_MAXFEE

constexpr CAmount wallet::DEFAULT_TRANSACTION_MAXFEE {COIN / 10}
constexpr

-maxtxfee default

Definition at line 140 of file wallet.h.

◆ DEFAULT_TRANSACTION_MINFEE

const CAmount wallet::DEFAULT_TRANSACTION_MINFEE = 1000
static

-mintxfee default

Definition at line 113 of file wallet.h.

◆ DEFAULT_TX_CONFIRM_TARGET

const unsigned int wallet::DEFAULT_TX_CONFIRM_TARGET = 6
static

-txconfirmtarget default

Definition at line 133 of file wallet.h.

◆ DEFAULT_WALLET_RBF

const bool wallet::DEFAULT_WALLET_RBF = true
static

-walletrbf default

Definition at line 135 of file wallet.h.

◆ DEFAULT_WALLET_REJECT_LONG_CHAINS

const bool wallet::DEFAULT_WALLET_REJECT_LONG_CHAINS {true}
static

Default for -walletrejectlongchains.

Definition at line 131 of file wallet.h.

◆ DEFAULT_WALLETBROADCAST

const bool wallet::DEFAULT_WALLETBROADCAST = true
static

Definition at line 136 of file wallet.h.

◆ DEFAULT_WALLETCROSSCHAIN

const bool wallet::DEFAULT_WALLETCROSSCHAIN = false
static

Definition at line 138 of file wallet.h.

◆ 

struct { ... } wallet::descending

◆ 

struct { ... } wallet::descending_effval_weight

◆ DUMMY_NESTED_P2WPKH_INPUT_SIZE

constexpr size_t wallet::DUMMY_NESTED_P2WPKH_INPUT_SIZE = 91
staticconstexpr

Pre-calculated constants for input size estimation in virtual size

Definition at line 146 of file wallet.h.

◆ DUMP_MAGIC

const std::string wallet::DUMP_MAGIC = "BITCOIN_CORE_WALLET_DUMP"
static

Definition at line 21 of file dump.cpp.

◆ DUMP_VERSION

uint32_t wallet::DUMP_VERSION = 1

Definition at line 22 of file dump.cpp.

◆ filter_confirmed

const CoinEligibilityFilter wallet::filter_confirmed(1, 1, 0) ( ,
,
 
)
static

◆ filter_standard

const CoinEligibilityFilter wallet::filter_standard(1, 6, 0) ( ,
,
 
)
static

◆ filter_standard_extra

const CoinEligibilityFilter wallet::filter_standard_extra(6, 6, 0) ( ,
,
 
)
static

◆ g_loading_wallet_mutex

GlobalMutex wallet::g_loading_wallet_mutex
static

Definition at line 219 of file wallet.cpp.

◆ g_wallet_release_cv

std::condition_variable wallet::g_wallet_release_cv
static

Definition at line 221 of file wallet.cpp.

◆ g_wallet_release_mutex

GlobalMutex wallet::g_wallet_release_mutex
static

Definition at line 220 of file wallet.cpp.

◆ HEADER_END

const char* wallet::HEADER_END = "HEADER=END"
static

Definition at line 18 of file salvage.cpp.

◆ HELP_REQUIRING_PASSPHRASE

const std::string wallet::HELP_REQUIRING_PASSPHRASE {"\nRequires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.\n"}

Definition at line 21 of file util.cpp.

◆ HIGH_APS_FEE

constexpr CAmount wallet::HIGH_APS_FEE {COIN / 10000}
constexpr

discourage APS fee higher than this amount

Definition at line 125 of file wallet.h.

◆ HIGH_MAX_TX_FEE

constexpr CAmount wallet::HIGH_MAX_TX_FEE {100 * HIGH_TX_FEE_PER_KB}
constexpr

-maxtxfee will warn if called with a higher fee than this amount (in satoshis)

Definition at line 144 of file wallet.h.

◆ HIGH_TX_FEE_PER_KB

constexpr CAmount wallet::HIGH_TX_FEE_PER_KB {COIN / 100}
constexpr

Discourage users to set fees higher than this amount (in satoshis) per kB.

Definition at line 142 of file wallet.h.

◆ KNOWN_WALLET_FLAGS

constexpr uint64_t wallet::KNOWN_WALLET_FLAGS
staticconstexpr
Initial value:
=
@ WALLET_FLAG_EXTERNAL_SIGNER
Indicates that the wallet needs an external signer.
Definition: walletutil.h:77
@ WALLET_FLAG_LAST_HARDENED_XPUB_CACHED
Definition: walletutil.h:48
@ WALLET_FLAG_KEY_ORIGIN_METADATA
Definition: walletutil.h:45
@ WALLET_FLAG_AVOID_REUSE
Definition: walletutil.h:42
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
Definition: walletutil.h:74
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
Definition: walletutil.h:51
@ WALLET_FLAG_BLANK_WALLET
Flag set when a wallet contains no HD seed and no private keys, scripts, addresses,...
Definition: walletutil.h:71

Definition at line 153 of file wallet.h.

◆ LEGACY_OUTPUT_TYPES

const std::unordered_set<OutputType> wallet::LEGACY_OUTPUT_TYPES
static
Initial value:

OutputTypes supported by the LegacyScriptPubKeyMan.

Definition at line 273 of file scriptpubkeyman.h.

◆ MUTABLE_WALLET_FLAGS

constexpr uint64_t wallet::MUTABLE_WALLET_FLAGS
staticconstexpr
Initial value:

Definition at line 162 of file wallet.h.

◆ nextLockTime [1/2]

int wallet::nextLockTime = 0
static

Definition at line 38 of file coinselector_tests.cpp.

◆ nextLockTime [2/2]

int wallet::nextLockTime = 0
static

Definition at line 17 of file group_outputs_tests.cpp.

◆ OUTPUT_GROUP_MAX_ENTRIES

constexpr size_t wallet::OUTPUT_GROUP_MAX_ENTRIES {100}
staticconstexpr

Definition at line 39 of file spend.cpp.

◆ RESULT_LAST_PROCESSED_BLOCK

const RPCResult wallet::RESULT_LAST_PROCESSED_BLOCK
static
Initial value:
{ RPCResult::Type::OBJ, "lastprocessedblock", "hash and height of the block this information was generated on",{
{RPCResult::Type::STR_HEX, "hash", "hash of the block this information was generated on"},
{RPCResult::Type::NUM, "height", "height of the block this information was generated on"}}
}
@ STR_HEX
Special string with only hex chars.

Definition at line 28 of file util.h.

◆ REVERSE_BYTE_ORDER

constexpr auto wallet::REVERSE_BYTE_ORDER {std::endian::native == std::endian::little ? 4321 : 1234}
staticconstexpr

Definition at line 68 of file bdb.cpp.

◆ SUBDATABASE_NAME

const std::vector<std::byte> wallet::SUBDATABASE_NAME = {std::byte{'m'}, std::byte{'a'}, std::byte{'i'}, std::byte{'n'}}
static

Definition at line 20 of file migrate.cpp.

◆ TIMESTAMP_MIN

const int64_t wallet::TIMESTAMP_MIN = 0
static

Definition at line 88 of file backup.cpp.

◆ TOTAL_TRIES

const size_t wallet::TOTAL_TRIES = 100000
static

Definition at line 91 of file coinselection.cpp.

◆ UNKNOWN_TIME

constexpr int64_t wallet::UNKNOWN_TIME = std::numeric_limits<int64_t>::max()
staticconstexpr

Constant representing an unknown spkm creation time.

Definition at line 61 of file scriptpubkeyman.h.

◆ WALLET_CRYPTO_IV_SIZE

const unsigned int wallet::WALLET_CRYPTO_IV_SIZE = 16

Definition at line 16 of file crypter.h.

◆ WALLET_CRYPTO_KEY_SIZE

const unsigned int wallet::WALLET_CRYPTO_KEY_SIZE = 32

Definition at line 14 of file crypter.h.

◆ WALLET_CRYPTO_SALT_SIZE

const unsigned int wallet::WALLET_CRYPTO_SALT_SIZE = 8

Definition at line 15 of file crypter.h.

◆ WALLET_ENDPOINT_BASE

const std::string wallet::WALLET_ENDPOINT_BASE = "/wallet/"
static

Definition at line 20 of file util.cpp.

◆ WALLET_FLAG_CAVEATS

const std::map<uint64_t, std::string> wallet::WALLET_FLAG_CAVEATS
static
Initial value:
{
"You need to rescan the blockchain in order to correctly mark used "
"destinations in the past. Until this is done, some destinations may "
"be considered unused, even if the opposite is the case."},
}

Definition at line 27 of file wallet.cpp.

◆ WALLET_FLAG_MAP

const std::map<std::string,WalletFlags> wallet::WALLET_FLAG_MAP
static
Initial value:
{
{"avoid_reuse", WALLET_FLAG_AVOID_REUSE},
{"key_origin_metadata", WALLET_FLAG_KEY_ORIGIN_METADATA},
{"last_hardened_xpub_cached", WALLET_FLAG_LAST_HARDENED_XPUB_CACHED},
{"disable_private_keys", WALLET_FLAG_DISABLE_PRIVATE_KEYS},
{"descriptor_wallet", WALLET_FLAG_DESCRIPTORS},
{"external_signer", WALLET_FLAG_EXTERNAL_SIGNER}
}

Definition at line 165 of file wallet.h.

◆ WALLET_INCREMENTAL_RELAY_FEE

const CAmount wallet::WALLET_INCREMENTAL_RELAY_FEE = 5000
static

minimum recommended increment for replacement txs

Definition at line 127 of file wallet.h.

◆ WALLET_SCHEMA_VERSION

constexpr int32_t wallet::WALLET_SCHEMA_VERSION = 0
staticconstexpr

Definition at line 27 of file sqlite.cpp.