![]() |
Bitcoin ABC 0.33.6
P2P Digital Currency
|
#include <common/signmessage.h>#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/result.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.
Classes | |
| class | ReserveDestination |
| A wrapper to reserve an address from a wallet. More... | |
| class | CAddressBookData |
| Address book data. More... | |
| struct | CRecipient |
| struct | CoinSelectionParams |
| class | CWallet |
| A CWallet maintains a set of transactions and balances, and provides the ability to create new transactions. More... | |
| struct | CWallet::ScanResult |
| class | WalletRescanReserver |
| RAII object to check and reserve a wallet rescan. More... | |
Namespaces | |
| namespace | common |
Typedefs | |
| using | LoadWalletFn = std::function< void(std::unique_ptr< interfaces::Wallet > wallet)> |
Functions | |
| void | WaitForDeleteWallet (std::shared_ptr< CWallet > &&wallet) |
| Explicitly delete the wallet. 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< CWallet > | GetWallet (WalletContext &context, const std::string &name) |
| std::shared_ptr< CWallet > | 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 > | 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 > | 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) |
| std::unique_ptr< interfaces::Handler > | HandleLoadWallet (WalletContext &context, LoadWalletFn load_wallet) |
| void | NotifyWalletLoaded (WalletContext &context, const std::shared_ptr< CWallet > &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 More... | |
| void | MaybeResendWalletTxs (WalletContext &context) |
| Called periodically by the schedule thread. 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... | |
Variables | |
| constexpr Amount | DEFAULT_PAY_TX_FEE = Amount::zero() |
| -paytxfee default More... | |
| static const Amount | DEFAULT_FALLBACK_FEE = Amount::zero() |
| -fallbackfee default More... | |
| static const Amount | DEFAULT_TRANSACTION_MINFEE_PER_KB = 1000 * SATOSHI |
| -mintxfee default More... | |
| static const Amount | DEFAULT_MAX_AVOIDPARTIALSPEND_FEE = Amount::zero() |
| maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled by default More... | |
| constexpr Amount | HIGH_APS_FEE {COIN / 10000} |
| discourage APS fee higher than this amount More... | |
| static const bool | DEFAULT_SPEND_ZEROCONF_CHANGE = true |
| Default for -spendzeroconfchange. More... | |
| static const bool | DEFAULT_WALLETBROADCAST = true |
| static const bool | DEFAULT_DISABLE_WALLET = false |
| constexpr Amount | DEFAULT_TRANSACTION_MAXFEE {COIN / 10} |
| -maxtxfee default More... | |
| constexpr Amount | HIGH_TX_FEE_PER_KB {COIN / 100} |
| Discourage users to set fees higher than this amount (in satoshis) per kB. More... | |
| constexpr Amount | 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_P2PKH_INPUT_SIZE = 148 |
| Pre-calculated constants for input size estimation. More... | |
| constexpr OutputType | DEFAULT_ADDRESS_TYPE {OutputType::LEGACY} |
| Default for -addresstype. More... | |
| static constexpr uint64_t | KNOWN_WALLET_FLAGS |
| static constexpr uint64_t | MUTABLE_WALLET_FLAGS = WALLET_FLAG_AVOID_REUSE |
| static const std::map< std::string, WalletFlags > | WALLET_FLAG_MAP |
| const std::map< uint64_t, std::string > | WALLET_FLAG_CAVEATS |
| using LoadWalletFn = std::function<void(std::unique_ptr<interfaces::Wallet> wallet)> |
| bool AddWallet | ( | WalletContext & | context, |
| const std::shared_ptr< CWallet > & | wallet | ||
| ) |
Definition at line 110 of file wallet.cpp.
| bool 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 58 of file wallet.cpp.
| std::shared_ptr< CWallet > 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 301 of file wallet.cpp.
| std::shared_ptr< CWallet > GetWallet | ( | WalletContext & | context, |
| const std::string & | name | ||
| ) |
| std::vector< std::shared_ptr< CWallet > > GetWallets | ( | WalletContext & | context | ) |
| std::unique_ptr< interfaces::Handler > HandleLoadWallet | ( | WalletContext & | context, |
| LoadWalletFn | load_wallet | ||
| ) |
Definition at line 177 of file wallet.cpp.
| std::shared_ptr< CWallet > 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 283 of file wallet.cpp.
| std::unique_ptr< WalletDatabase > MakeWalletDatabase | ( | const std::string & | name, |
| const DatabaseOptions & | options, | ||
| DatabaseStatus & | status, | ||
| bilingual_str & | error | ||
| ) |
Definition at line 2746 of file wallet.cpp.
| void 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 2070 of file wallet.cpp.
| void NotifyWalletLoaded | ( | WalletContext & | context, |
| const std::shared_ptr< CWallet > & | wallet | ||
| ) |
Definition at line 187 of file wallet.cpp.
| bool RemoveWallet | ( | WalletContext & | context, |
| const std::shared_ptr< CWallet > & | wallet, | ||
| std::optional< bool > | load_on_start | ||
| ) |
| bool RemoveWallet | ( | WalletContext & | context, |
| const std::shared_ptr< CWallet > & | wallet, | ||
| std::optional< bool > | load_on_start, | ||
| std::vector< bilingual_str > & | warnings | ||
| ) |
Definition at line 124 of file wallet.cpp.
| bool 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 73 of file wallet.cpp.
| std::shared_ptr< CWallet > 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 403 of file wallet.cpp.
| void WaitForDeleteWallet | ( | std::shared_ptr< CWallet > && | wallet | ) |
Explicitly delete the wallet.
Blocks the current thread until the wallet is destructed.
Definition at line 220 of file wallet.cpp.
|
static |
minimum recommended increment for BIP 125 replacement txs
|
constexpr |
|
static |
|
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].
|
constexpr |
|
static |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
staticconstexpr |
|
extern |
Definition at line 51 of file wallet.cpp.
|
static |