#include <common/system.h>
#include <consensus/amount.h>
#include <interfaces/chain.h>
#include <interfaces/handler.h>
#include <logging.h>
#include <outputtype.h>
#include <primitives/blockhash.h>
#include <psbt.h>
#include <tinyformat.h>
#include <util/message.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/translation.h>
#include <util/ui_change_type.h>
#include <validationinterface.h>
#include <wallet/coinselection.h>
#include <wallet/crypter.h>
#include <wallet/rpcwallet.h>
#include <wallet/scriptpubkeyman.h>
#include <wallet/transaction.h>
#include <wallet/walletdb.h>
#include <wallet/walletutil.h>
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
#include <boost/signals2/signal.hpp>
Go to the source code of this file.
|
void | UnloadWallet (std::shared_ptr< CWallet > &&wallet) |
| Explicitly unload and delete the wallet.
|
|
bool | AddWallet (const std::shared_ptr< CWallet > &wallet) |
|
bool | RemoveWallet (const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings) |
|
bool | RemoveWallet (const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start) |
|
std::vector< std::shared_ptr< CWallet > > | GetWallets () |
|
std::shared_ptr< CWallet > | GetWallet (const std::string &name) |
|
std::shared_ptr< CWallet > | LoadWallet (interfaces::Chain &chain, 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 > | CreateWallet (interfaces::Chain &chain, const std::string &name, std::optional< bool > load_on_start, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings) |
|
std::unique_ptr< interfaces::Handler > | HandleLoadWallet (LoadWalletFn load_wallet) |
|
std::unique_ptr< WalletDatabase > | MakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error) |
|
static const Amount | WALLET_INCREMENTAL_RELAY_FEE (5000 *SATOSHI) |
| minimum recommended increment for BIP 125 replacement txs
|
|
void | MaybeResendWalletTxs () |
| Called periodically by the schedule thread.
|
|
bool | AddWalletSetting (interfaces::Chain &chain, const std::string &wallet_name) |
| Add wallet name to persistent configuration so it will be loaded on startup.
|
|
bool | RemoveWalletSetting (interfaces::Chain &chain, const std::string &wallet_name) |
| Remove wallet name from persistent configuration so it will not be loaded on startup.
|
|
◆ LoadWalletFn
◆ AddWallet()
◆ AddWalletSetting()
Add wallet name to persistent configuration so it will be loaded on startup.
Definition at line 55 of file wallet.cpp.
◆ CreateWallet()
◆ GetWallet()
◆ GetWallets()
◆ HandleLoadWallet()
◆ LoadWallet()
◆ MakeWalletDatabase()
◆ MaybeResendWalletTxs()
void MaybeResendWalletTxs |
( |
| ) |
|
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 1991 of file wallet.cpp.
◆ RemoveWallet() [1/2]
◆ RemoveWallet() [2/2]
◆ RemoveWalletSetting()
Remove wallet name from persistent configuration so it will not be loaded on startup.
Definition at line 70 of file wallet.cpp.
◆ UnloadWallet()
Explicitly unload and delete the wallet.
Blocks the current thread after signaling the unload intent so that all wallet clients release the wallet. Note that, when blocking is not required, the wallet is implicitly unloaded by the shared pointer deleter.
Definition at line 202 of file wallet.cpp.
◆ WALLET_INCREMENTAL_RELAY_FEE()
static const Amount WALLET_INCREMENTAL_RELAY_FEE |
( |
5000 * |
SATOSHI | ) |
|
|
static |
minimum recommended increment for BIP 125 replacement txs
◆ DEFAULT_ADDRESS_TYPE
Default for -addresstype.
Definition at line 126 of file wallet.h.
◆ DEFAULT_DISABLE_WALLET
◆ DEFAULT_FALLBACK_FEE
-fallbackfee default
Definition at line 85 of file wallet.h.
◆ DEFAULT_MAX_AVOIDPARTIALSPEND_FEE
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 98 of file wallet.h.
◆ DEFAULT_PAY_TX_FEE
-paytxfee default
Definition at line 83 of file wallet.h.
◆ DEFAULT_SPEND_ZEROCONF_CHANGE
const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true |
|
static |
Default for -spendzeroconfchange.
Definition at line 104 of file wallet.h.
◆ DEFAULT_TRANSACTION_MAXFEE
-maxtxfee default
Definition at line 108 of file wallet.h.
◆ DEFAULT_TRANSACTION_MINFEE_PER_KB
-mintxfee default
Definition at line 87 of file wallet.h.
◆ DEFAULT_WALLETBROADCAST
const bool DEFAULT_WALLETBROADCAST = true |
|
static |
◆ DUMMY_P2PKH_INPUT_SIZE
Pre-calculated constants for input size estimation.
Definition at line 115 of file wallet.h.
◆ HIGH_APS_FEE
discourage APS fee higher than this amount
Definition at line 100 of file wallet.h.
◆ HIGH_MAX_TX_FEE
-maxtxfee will warn if called with a higher fee than this amount (in satoshis)
Definition at line 113 of file wallet.h.
◆ HIGH_TX_FEE_PER_KB
Discourage users to set fees higher than this amount (in satoshis) per kB.
Definition at line 110 of file wallet.h.
◆ KNOWN_WALLET_FLAGS
Initial value:=
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
@ WALLET_FLAG_AVOID_REUSE
@ WALLET_FLAG_KEY_ORIGIN_METADATA
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
@ WALLET_FLAG_BLANK_WALLET
Flag set when a wallet contains no HD seed and no private keys, scripts, addresses,...
Definition at line 128 of file wallet.h.
◆ MUTABLE_WALLET_FLAGS
◆ WALLET_FLAG_CAVEATS
◆ WALLET_FLAG_MAP
Initial value:
Definition at line 135 of file wallet.h.