![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
#include <wallet/wallet.h>#include <bitcoin-build-config.h>#include <addresstype.h>#include <blockfilter.h>#include <chain.h>#include <coins.h>#include <common/args.h>#include <common/messages.h>#include <common/settings.h>#include <common/signmessage.h>#include <common/system.h>#include <consensus/amount.h>#include <consensus/consensus.h>#include <consensus/validation.h>#include <external_signer.h>#include <interfaces/chain.h>#include <interfaces/handler.h>#include <interfaces/wallet.h>#include <kernel/mempool_removal_reason.h>#include <kernel/types.h>#include <key.h>#include <key_io.h>#include <logging.h>#include <node/types.h>#include <outputtype.h>#include <policy/feerate.h>#include <policy/truc_policy.h>#include <primitives/block.h>#include <primitives/transaction.h>#include <psbt.h>#include <pubkey.h>#include <random.h>#include <script/descriptor.h>#include <script/interpreter.h>#include <script/script.h>#include <script/sign.h>#include <script/signingprovider.h>#include <script/solver.h>#include <serialize.h>#include <span.h>#include <streams.h>#include <support/allocators/secure.h>#include <support/allocators/zeroafterfree.h>#include <support/cleanse.h>#include <sync.h>#include <tinyformat.h>#include <uint256.h>#include <univalue.h>#include <util/check.h>#include <util/fs.h>#include <util/fs_helpers.h>#include <util/moneystr.h>#include <util/result.h>#include <util/string.h>#include <util/time.h>#include <util/translation.h>#include <wallet/coincontrol.h>#include <wallet/context.h>#include <wallet/crypter.h>#include <wallet/db.h>#include <wallet/external_signer_scriptpubkeyman.h>#include <wallet/scriptpubkeyman.h>#include <wallet/transaction.h>#include <wallet/types.h>#include <wallet/walletdb.h>#include <wallet/walletutil.h>#include <algorithm>#include <cassert>#include <condition_variable>#include <exception>#include <optional>#include <stdexcept>#include <thread>#include <tuple>#include <variant>Go to the source code of this file.
Namespaces | |
| namespace | 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. | |
| 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. | |
| 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 ... | |
| 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::GetDefaultWallet (WalletContext &context, size_t &count) |
| std::shared_ptr< CWallet > | wallet::GetWallet (WalletContext &context, const std::string &name) |
| std::unique_ptr< interfaces::Handler > | wallet::HandleLoadWallet (WalletContext &context, LoadWalletFn load_wallet) |
| void | wallet::NotifyWalletLoaded (WalletContext &context, const std::shared_ptr< CWallet > &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::FlushAndDeleteWallet (CWallet *wallet) |
| void | wallet::WaitForDeleteWallet (std::shared_ptr< CWallet > &&wallet) |
| Explicitly delete the wallet. | |
| 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 load_after_restore, bool allow_unnamed) |
| static bool | wallet::EncryptMasterKey (const SecureString &wallet_passphrase, const CKeyingMaterial &plain_master_key, CMasterKey &master_key) |
| static bool | wallet::DecryptMasterKey (const SecureString &wallet_passphrase, const CMasterKey &master_key, CKeyingMaterial &plain_master_key) |
| void | wallet::MaybeResendWalletTxs (WalletContext &context) |
| Called periodically by the schedule thread. | |
| static util::Result< fs::path > | wallet::GetWalletPath (const std::string &name) |
| std::unique_ptr< WalletDatabase > | wallet::MakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string) |
| static std::string | wallet::MigrationPrefixName (CWallet &wallet) |
| bool | wallet::DoMigration (CWallet &wallet, WalletContext &context, bilingual_str &error, MigrationResult &res) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) |
| 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. | |
| util::Result< MigrationResult > | wallet::MigrateLegacyToDescriptor (std::shared_ptr< CWallet > local_wallet, const SecureString &passphrase, WalletContext &context) |
| Requirement: The wallet provided to this function must be isolated, with no attachment to the node's context. | |
Variables | |
| static GlobalMutex | wallet::g_loading_wallet_mutex |
| static GlobalMutex | wallet::g_wallet_release_mutex |
| static std::condition_variable | wallet::g_wallet_release_cv |
|
private |
Definition at line 353 of file wallet.cpp.
Map for keeping track of each range descriptor's last seen end range.
This information is used to detect whether new addresses were derived (that is, if the current end range is larger than the saved end range) after processing a block and hence a filter set update is needed to take possible keypool top-ups into account.
Definition at line 352 of file wallet.cpp.
|
private |
Definition at line 345 of file wallet.cpp.