Bitcoin Core  22.99.0
P2P Digital Currency
Namespaces | Functions | Variables
wallet.cpp File Reference
#include <wallet/wallet.h>
#include <chain.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <external_signer.h>
#include <fs.h>
#include <interfaces/chain.h>
#include <interfaces/wallet.h>
#include <key.h>
#include <key_io.h>
#include <outputtype.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <psbt.h>
#include <script/descriptor.h>
#include <script/script.h>
#include <script/signingprovider.h>
#include <txmempool.h>
#include <util/bip32.h>
#include <util/check.h>
#include <util/error.h>
#include <util/fees.h>
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/string.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
#include <wallet/context.h>
#include <wallet/fees.h>
#include <wallet/external_signer_scriptpubkeyman.h>
#include <univalue.h>
#include <algorithm>
#include <assert.h>
#include <optional>
#include <boost/algorithm/string/replace.hpp>
Include dependency graph for wallet.cpp:

Go to the source code of this file.

Namespaces

 wallet
 

Functions

bool wallet::AddWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Add wallet name to persistent configuration so it will be loaded on startup. More...
 
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. More...
 
static void wallet::UpdateWalletSetting (interfaces::Chain &chain, const std::string &wallet_name, std::optional< bool > load_on_startup, std::vector< bilingual_str > &warnings)
 
static void wallet::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 wallet::AddWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet)
 
bool wallet::RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
 
bool wallet::RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start)
 
std::vector< std::shared_ptr< CWallet > > wallet::GetWallets (WalletContext &context)
 
std::shared_ptr< CWallet > wallet::GetWallet (WalletContext &context, const std::string &name)
 
std::unique_ptr< interfaces::Handlerwallet::HandleLoadWallet (WalletContext &context, LoadWalletFn load_wallet)
 
static std::set< std::string > g_loading_wallet_set wallet::GUARDED_BY (g_loading_wallet_mutex)
 
static std::set< std::string > g_unloading_wallet_set wallet::GUARDED_BY (g_wallet_release_mutex)
 
static void wallet::ReleaseWallet (CWallet *wallet)
 
void wallet::UnloadWallet (std::shared_ptr< CWallet > &&wallet)
 Explicitly unload and delete the wallet. More...
 
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)
 
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)
 
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)
 
bool wallet::DummySignInput (const SigningProvider &provider, CTxIn &tx_in, const CTxOut &txout, bool use_max_sig)
 
bool wallet::FillInputToWeight (CTxIn &txin, int64_t target_weight)
 
void wallet::MaybeResendWalletTxs (WalletContext &context)
 Called periodically by the schedule thread. More...
 
std::unique_ptr< WalletDatabase > wallet::MakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string)
 

Variables

const std::map< uint64_t, std::string > wallet::WALLET_FLAG_CAVEATS
 
static Mutex wallet::g_loading_wallet_mutex
 
static Mutex wallet::g_wallet_release_mutex
 
static std::condition_variable wallet::g_wallet_release_cv