Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, and provides the ability to create new transactions. More...
#include <wallet.h>
Public Types | |
typedef std::map< unsigned int, CMasterKey > | MasterKeyMap |
typedef std::pair< CWalletTx *, CAccountingEntry * > | TxPair |
typedef std::multimap< int64_t, TxPair > | TxItems |
Public Member Functions | |
WalletDatabase & | GetDBHandle () |
Get database handle used by this wallet. More... | |
const std::string & | GetName () const |
Get a name for this wallet for logging/debugging purposes. More... | |
void | LoadKeyPool (int64_t nIndex, const CKeyPool &keypool) |
CWallet (std::string name, std::unique_ptr< WalletDatabase > database) | |
Construct wallet with specified name and database implementation. More... | |
~CWallet () | |
void | SetNull () |
const CWalletTx * | GetWalletTx (const uint256 &hash) const |
bool | CanSupportFeature (enum WalletFeature wf) const |
check whether we are allowed to upgrade (or already support) to the named feature More... | |
void | AvailableCoins (std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t nMaximumCount=0, const int nMinDepth=0, const int nMaxDepth=9999999) const |
populate vCoins with vector of available COutputs. More... | |
std::map< CTxDestination, std::vector< COutput > > | ListCoins () const |
Return list of available coins and locked coins grouped by non-change output address. More... | |
const CTxOut & | FindNonChangeParentOutput (const CTransaction &tx, int output) const |
Find non-change parent output. More... | |
bool | SelectCoinsMinConf (const CAmount &nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector< COutput > vCoins, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet, CoinType nCoinType=CoinType::ALL_COINS) const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled. More... | |
bool | SelectPSInOutPairsByDenominations (int nDenom, CAmount nValueMax, std::vector< std::pair< CTxDSIn, CTxOut > > &vecPSInOutPairsRet) |
bool | GetCollateralTxDSIn (CTxDSIn &txdsinRet, CAmount &nValueRet) const |
bool | SelectDenominatedAmounts (CAmount nValueMax, std::set< CAmount > &setAmountsRet) const |
bool | SelectCoinsGroupedByAddresses (std::vector< CompactTallyItem > &vecTallyRet, bool fSkipDenominated=true, bool fAnonymizable=true, bool fSkipUnconfirmed=true, int nMaxOupointsPerAddress=-1) const |
bool | GetMasternodeOutpointAndKeys (COutPoint &outpointRet, CPubKey &pubKeyRet, CKey &keyRet, const std::string &strTxHash="", const std::string &strOutputIndex="") |
Get 1000DASH output and keys which can be used for the Masternode. More... | |
bool | GetOutpointAndKeysFromOutput (const COutput &out, COutPoint &outpointRet, CPubKey &pubKeyRet, CKey &keyRet) |
Extract txin information and keys from output. More... | |
bool | HasCollateralInputs (bool fOnlyConfirmed=true) const |
int | CountInputsWithAmount (CAmount nInputAmount) const |
int | GetRealOutpointPrivateSendRounds (const COutPoint &outpoint, int nRounds=0) const |
int | GetCappedOutpointPrivateSendRounds (const COutPoint &outpoint) const |
bool | IsDenominated (const COutPoint &outpoint) const |
bool | IsFullyMixed (const COutPoint &outpoint) const |
bool | IsSpent (const uint256 &hash, unsigned int n) const |
Outpoint is spent if any non-conflicted transaction spends it: More... | |
bool | IsLockedCoin (uint256 hash, unsigned int n) const |
void | LockCoin (const COutPoint &output) |
void | UnlockCoin (const COutPoint &output) |
void | UnlockAllCoins () |
void | ListLockedCoins (std::vector< COutPoint > &vOutpts) const |
void | ListProTxCoins (std::vector< COutPoint > &vOutpts) |
void | AbortRescan () |
bool | IsAbortingRescan () |
bool | IsScanning () |
CPubKey | GenerateNewKey (WalletBatch &batch, uint32_t nAccountIndex, bool fInternal) |
keystore implementation Generate a new key More... | |
bool | HaveKey (const CKeyID &address) const override |
HaveKey implementation that also checks the mapHdPubKeys. More... | |
bool | GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override |
GetPubKey implementation that also checks the mapHdPubKeys. More... | |
bool | GetKey (const CKeyID &address, CKey &keyOut) const override |
GetKey implementation that can derive a HD private key on the fly. More... | |
bool | AddHDPubKey (WalletBatch &batch, const CExtPubKey &extPubKey, bool fInternal) |
Adds a HDPubKey into the wallet(database) More... | |
bool | LoadHDPubKey (const CHDPubKey &hdPubKey) |
loads a HDPubKey into the wallets memory More... | |
bool | AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override |
Adds a key to the store, and saves it to disk. More... | |
bool | AddKeyPubKeyWithDB (WalletBatch &batch, const CKey &key, const CPubKey &pubkey) |
bool | LoadKey (const CKey &key, const CPubKey &pubkey) |
Adds a key to the store, without saving it to disk (used by LoadWallet) More... | |
bool | LoadKeyMetadata (const CKeyID &keyID, const CKeyMetadata &metadata) |
Load metadata (used by LoadWallet) More... | |
bool | LoadScriptMetadata (const CScriptID &script_id, const CKeyMetadata &metadata) |
bool | LoadMinVersion (int nVersion) |
void | UpdateTimeFirstKey (int64_t nCreateTime) |
Update wallet first key creation time. More... | |
bool | AddCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret) override |
Adds an encrypted key to the store, and saves it to disk. More... | |
bool | LoadCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret) |
Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) More... | |
bool | AddCScript (const CScript &redeemScript) override |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More... | |
bool | LoadCScript (const CScript &redeemScript) |
bool | AddDestData (const CTxDestination &dest, const std::string &key, const std::string &value) |
Adds a destination data tuple to the store, and saves it to disk. More... | |
bool | EraseDestData (const CTxDestination &dest, const std::string &key) |
Erases a destination data tuple in the store and on disk. More... | |
bool | LoadDestData (const CTxDestination &dest, const std::string &key, const std::string &value) |
Adds a destination data tuple to the store, without saving it to disk. More... | |
bool | GetDestData (const CTxDestination &dest, const std::string &key, std::string *value) const |
Look up a destination data tuple in the store, return true if found false otherwise. More... | |
std::vector< std::string > | GetDestValues (const std::string &prefix) const |
Get all destination values matching a prefix. More... | |
bool | AddWatchOnly (const CScript &dest, int64_t nCreateTime) |
Adds a watch-only address to the store, and saves it to disk. More... | |
bool | RemoveWatchOnly (const CScript &dest) override |
bool | LoadWatchOnly (const CScript &dest) |
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) More... | |
bool | Unlock (const SecureString &strWalletPassphrase, bool fForMixingOnly=false) |
bool | ChangeWalletPassphrase (const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase) |
bool | EncryptWallet (const SecureString &strWalletPassphrase) |
void | GetKeyBirthTimes (std::map< CTxDestination, int64_t > &mapKeyBirth) const |
unsigned int | ComputeTimeSmart (const CWalletTx &wtx) const |
Compute smart timestamp for a transaction being added to the wallet. More... | |
int64_t | IncOrderPosNext (WalletBatch *batch=nullptr) |
Increment the next transaction order id. More... | |
DBErrors | ReorderTransactions () |
bool | AccountMove (std::string strFrom, std::string strTo, CAmount nAmount, std::string strComment="") |
bool | GetAccountDestination (CTxDestination &dest, std::string strAccount, bool bForceNew=false) |
void | MarkDirty () |
bool | AddToWallet (const CWalletTx &wtxIn, bool fFlushOnClose=true) |
bool | LoadToWallet (const CWalletTx &wtxIn) |
void | TransactionAddedToMempool (const CTransactionRef &tx, int64_t nAcceptTime) override |
Notifies listeners of a transaction having been added to mempool. More... | |
void | BlockConnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex, const std::vector< CTransactionRef > &vtxConflicted) override |
Notifies listeners of a block being connected. More... | |
void | BlockDisconnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexDisconnected) override |
Notifies listeners of a block being disconnected. More... | |
bool | AddToWalletIfInvolvingMe (const CTransactionRef &tx, const CBlockIndex *pIndex, int posInBlock, bool fUpdate) |
Add a transaction to the wallet, or update it. More... | |
int64_t | RescanFromTime (int64_t startTime, const WalletRescanReserver &reserver, bool update) |
Scan active chain for relevant transactions after importing keys. More... | |
CBlockIndex * | ScanForWalletTransactions (CBlockIndex *pindexStart, CBlockIndex *pindexStop, const WalletRescanReserver &reserver, bool fUpdate=false) |
Scan the block chain (starting in pindexStart) for transactions from or to us. More... | |
void | TransactionRemovedFromMempool (const CTransactionRef &ptx) override |
Notifies listeners of a transaction leaving mempool. More... | |
void | ReacceptWalletTransactions () |
void | ResendWalletTransactions (int64_t nBestBlockTime, CConnman *connman) override |
Tells listeners to broadcast their data. More... | |
std::vector< uint256 > | ResendWalletTransactionsBefore (int64_t nTime, CConnman *connman) |
CAmount | GetBalance () const |
CAmount | GetUnconfirmedBalance () const |
CAmount | GetImmatureBalance () const |
CAmount | GetWatchOnlyBalance () const |
CAmount | GetUnconfirmedWatchOnlyBalance () const |
CAmount | GetImmatureWatchOnlyBalance () const |
CAmount | GetLegacyBalance (const isminefilter &filter, int minDepth, const std::string *account, const bool fAddLocked) const |
CAmount | GetAnonymizableBalance (bool fSkipDenominated=false, bool fSkipUnconfirmed=true) const |
CAmount | GetAnonymizedBalance (const CCoinControl *coinControl=nullptr) const |
float | GetAverageAnonymizedRounds () const |
CAmount | GetNormalizedAnonymizedBalance () const |
CAmount | GetDenominatedBalance (bool unconfirmed=false) const |
bool | GetBudgetSystemCollateralTX (CWalletTx &tx, uint256 hash, CAmount amount, const COutPoint &outpoint=COutPoint()) |
CAmount | GetAvailableBalance (const CCoinControl *coinControl=nullptr) const |
bool | FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl) |
Insert additional inputs into the transaction by calling CreateTransaction();. More... | |
bool | SignTransaction (CMutableTransaction &tx) |
bool | CreateTransaction (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool sign=true, int nExtraPayloadSize=0) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More... | |
bool | CommitTransaction (CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, CValidationState &state) |
Call after CreateTransaction unless you want to abort. More... | |
bool | CreateCollateralTransaction (CMutableTransaction &txCollateral, std::string &strReason) |
void | ListAccountCreditDebit (const std::string &strAccount, std::list< CAccountingEntry > &entries) |
bool | AddAccountingEntry (const CAccountingEntry &) |
bool | AddAccountingEntry (const CAccountingEntry &, WalletBatch *batch) |
bool | NewKeyPool () |
Mark old keypool keys as used, and generate all new keys. More... | |
size_t | KeypoolCountExternalKeys () |
size_t | KeypoolCountInternalKeys () |
bool | TopUpKeyPool (unsigned int kpSize=0) |
void | ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool, bool fInternal) |
void | KeepKey (int64_t nIndex) |
void | ReturnKey (int64_t nIndex, bool fInternal, const CPubKey &pubkey) |
bool | GetKeyFromPool (CPubKey &key, bool fInternal) |
int64_t | GetOldestKeyPoolTime () |
void | MarkReserveKeysAsUsed (int64_t keypool_id) |
Marks all keys in the keypool up to and including reserve_key as used. More... | |
const std::map< CKeyID, int64_t > & | GetAllReserveKeys () const |
std::set< std::set< CTxDestination > > | GetAddressGroupings () |
std::map< CTxDestination, CAmount > | GetAddressBalances () |
std::set< CTxDestination > | GetAccountAddresses (const std::string &strAccount) const |
isminetype | IsMine (const CTxIn &txin) const |
CAmount | GetDebit (const CTxIn &txin, const isminefilter &filter) const |
Returns amount of debit if the input matches the filter, otherwise returns 0. More... | |
isminetype | IsMine (const CTxOut &txout) const |
CAmount | GetCredit (const CTxOut &txout, const isminefilter &filter) const |
bool | IsChange (const CTxOut &txout) const |
CAmount | GetChange (const CTxOut &txout) const |
bool | IsMine (const CTransaction &tx) const |
bool | IsFromMe (const CTransaction &tx) const |
should probably be renamed to IsRelevantToMe More... | |
CAmount | GetDebit (const CTransaction &tx, const isminefilter &filter) const |
bool | IsAllFromMe (const CTransaction &tx, const isminefilter &filter) const |
Returns whether all of the inputs match the filter. More... | |
CAmount | GetCredit (const CTransaction &tx, const isminefilter &filter) const |
CAmount | GetChange (const CTransaction &tx) const |
void | SetBestChain (const CBlockLocator &loc) override |
Notifies listeners of the new active block chain on-disk. More... | |
DBErrors | LoadWallet (bool &fFirstRunRet) |
void | AutoLockMasternodeCollaterals () |
DBErrors | ZapWalletTx (std::vector< CWalletTx > &vWtx) |
DBErrors | ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut) |
bool | SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose) |
bool | DelAddressBook (const CTxDestination &address) |
const std::string & | GetAccountName (const CScript &scriptPubKey) const |
void | GetScriptForMining (std::shared_ptr< CReserveScript > &script) |
unsigned int | GetKeyPoolSize () |
bool | SetMinVersion (enum WalletFeature, WalletBatch *batch_in=nullptr, bool fExplicit=false) |
signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower More... | |
bool | SetMaxVersion (int nVersion) |
change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format) More... | |
int | GetVersion () |
get the current wallet format (the oldest client version guaranteed to understand this wallet) More... | |
std::set< uint256 > | GetConflicts (const uint256 &txid) const |
Get wallet transactions that conflict with given transaction (spend same outputs) More... | |
void | Flush (bool shutdown=false) |
Flush wallet (bitdb flush) More... | |
bool | GetBroadcastTransactions () const |
Inquire whether this wallet broadcasts transactions. More... | |
void | SetBroadcastTransactions (bool broadcast) |
Set whether this wallet broadcasts transactions. More... | |
bool | TransactionCanBeAbandoned (const uint256 &hashTx) const |
Return whether transaction can be abandoned. More... | |
bool | AbandonTransaction (const uint256 &hashTx) |
void | postInitProcess () |
Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init tasks. More... | |
bool | AutoBackupWallet (const fs::path &wallet_path, std::string &strBackupWarningRet, std::string &strBackupErrorRet) |
bool | BackupWallet (const std::string &strDest) |
bool | IsHDEnabled () const |
HD Wallet Functions. More... | |
void | GenerateNewHDChain () |
bool | SetHDChain (WalletBatch &batch, const CHDChain &chain, bool memonly) |
bool | SetCryptedHDChain (WalletBatch &batch, const CHDChain &chain, bool memonly) |
bool | SetHDChainSingle (const CHDChain &chain, bool memonly) |
Set the HD chain model (chain child index counters) using temporary wallet db object which causes db flush every time these methods are used. More... | |
bool | SetCryptedHDChainSingle (const CHDChain &chain, bool memonly) |
bool | GetDecryptedHDChain (CHDChain &hdChainRet) |
void | NotifyTransactionLock (const CTransaction &tx, const llmq::CInstantSendLock &islock) override |
void | NotifyChainLock (const CBlockIndex *pindexChainLock, const llmq::CChainLockSig &clsig) override |
void | BlockUntilSyncedToCurrentChain () |
Blocks until the wallet state is up-to-date to /at least/ the current chain at the time this function is entered Obviously holding cs_main/cs_wallet when going into this call may cause deadlock. More... | |
Public Member Functions inherited from CCryptoKeyStore | |
CCryptoKeyStore () | |
bool | IsCrypted () const |
bool | IsLocked (bool fForMixing=false) const |
bool | Lock (bool fForMixing=false) |
std::set< CKeyID > | GetKeys () const override |
virtual bool | GetHDChain (CHDChain &hdChainRet) const override |
Public Member Functions inherited from CBasicKeyStore | |
bool | HaveCScript (const CScriptID &hash) const override |
std::set< CScriptID > | GetCScripts () const override |
bool | GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const override |
bool | HaveWatchOnly (const CScript &dest) const override |
bool | HaveWatchOnly () const override |
Public Member Functions inherited from CKeyStore | |
virtual | ~CKeyStore () |
virtual bool | AddKey (const CKey &key) |
Static Public Member Functions | |
static bool | Verify (std::string wallet_file, bool salvage_wallet, std::string &error_string, std::string &warning_string) |
Verify wallet naming and perform salvage on the wallet if required. More... | |
static CWallet * | CreateWalletFromFile (const std::string &name, const fs::path &path) |
static bool | InitAutoBackup () |
Public Attributes | |
CCriticalSection | cs_wallet |
std::map< CKeyID, CKeyMetadata > | mapKeyMetadata |
std::map< CScriptID, CKeyMetadata > | m_script_metadata |
MasterKeyMap | mapMasterKeys |
unsigned int | nMasterKeyMaxID |
std::map< uint256, CWalletTx > | mapWallet |
std::list< CAccountingEntry > | laccentries |
TxItems | wtxOrdered |
int64_t | nOrderPosNext |
uint64_t | nAccountingEntryNumber |
std::map< CTxDestination, CAddressBookData > | mapAddressBook |
std::set< COutPoint > | setLockedCoins |
int64_t | nKeysLeftSinceAutoBackup |
std::map< CKeyID, CHDPubKey > | mapHdPubKeys |
int64_t | nRelockTime |
Holds a timestamp at which point the wallet is scheduled (externally) to be relocked. Caller must arrange for actual relocking to occur via Lock(). More... | |
boost::signals2::signal< void(CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, const std::string &purpose, ChangeType status)> | NotifyAddressBookChanged |
Address book entry changed. More... | |
boost::signals2::signal< void(CWallet *wallet, const uint256 &hashTx, ChangeType status)> | NotifyTransactionChanged |
Wallet transaction added, removed or updated. More... | |
boost::signals2::signal< void(const std::string &title, int nProgress)> | ShowProgress |
Show progress e.g. More... | |
boost::signals2::signal< void(bool fHaveWatchOnly)> | NotifyWatchonlyChanged |
Watch-only address added. More... | |
boost::signals2::signal< void()> | NotifyISLockReceived |
IS-lock received. More... | |
boost::signals2::signal< void(int height)> | NotifyChainLockReceived |
ChainLock received. More... | |
Public Attributes inherited from CCryptoKeyStore | |
boost::signals2::signal< void(CCryptoKeyStore *wallet)> | NotifyStatusChanged |
Wallet status (encrypted, locked) changed. More... | |
Static Public Attributes | |
static CFeeRate | minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE) |
Fees smaller than this (in duffs) are considered zero fee (for transaction creation) Override with -mintxfee. More... | |
static CFeeRate | fallbackFee = CFeeRate(DEFAULT_FALLBACK_FEE) |
If fee estimation does not have enough data to provide estimates, use this fee instead. More... | |
static CFeeRate | m_discard_rate = CFeeRate(DEFAULT_DISCARD_FEE) |
Private Types | |
typedef std::multimap< COutPoint, uint256 > | TxSpends |
Used to keep track of spent outpoints, and detect and report conflicts (double-spends or mutated transactions where the mutant gets mined). More... | |
Private Member Functions | |
bool | SelectCoins (const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=nullptr) const |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours. More... | |
void | AddToSpends (const COutPoint &outpoint, const uint256 &wtxid) |
void | AddToSpends (const uint256 &wtxid) |
void | MarkConflicted (const uint256 &hashBlock, const uint256 &hashTx) |
void | SyncMetaData (std::pair< TxSpends::iterator, TxSpends::iterator >) |
void | SyncTransaction (const CTransactionRef &tx, const CBlockIndex *pindex=nullptr, int posInBlock=0) |
void | DeriveNewChildKey (WalletBatch &batch, const CKeyMetadata &metadata, CKey &secretRet, uint32_t nAccountIndex, bool fInternal) |
bool | AddWatchOnly (const CScript &dest) override |
Private version of AddWatchOnly method which does not accept a timestamp, and which will reset the wallet's nTimeFirstKey value to 1 if the watch key did not previously have a timestamp associated with it. More... | |
std::unordered_set< const CWalletTx *, WalletTxHasher > | GetSpendableTXs () const |
void | InitPrivateSendSalt () |
Fetches PrivateSend salt from database or generates and saves a new one if no salt was found in the db. More... | |
Private Attributes | |
std::atomic< bool > | fAbortRescan |
std::atomic< bool > | fScanningWallet |
std::mutex | mutexScanning |
WalletBatch * | encrypted_batch |
int | nWalletVersion |
the current wallet version: clients below this version are not able to load the wallet More... | |
int | nWalletMaxVersion |
the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded More... | |
int64_t | nNextResend |
int64_t | nLastResend |
bool | fBroadcastTransactions |
bool | fAnonymizableTallyCached |
std::vector< CompactTallyItem > | vecAnonymizableTallyCached |
bool | fAnonymizableTallyCachedNonDenom |
std::vector< CompactTallyItem > | vecAnonymizableTallyCachedNonDenom |
TxSpends | mapTxSpends |
std::set< COutPoint > | setWalletUTXO |
std::map< COutPoint, int > | mapOutpointRoundsCache |
std::set< int64_t > | setInternalKeyPool |
std::set< int64_t > | setExternalKeyPool |
int64_t | m_max_keypool_index |
std::map< CKeyID, int64_t > | m_pool_key_to_index |
int64_t | nTimeFirstKey |
std::string | m_name |
Wallet filename from wallet=<path> command line or config option. More... | |
std::unique_ptr< WalletDatabase > | database |
Internal database handle. More... | |
uint256 | hashPrevBestCoinbase |
const CBlockIndex * | m_last_block_processed |
The following is used to keep track of how far behind the wallet is from the chain sync, and to allow clients to block on us being caught up. More... | |
uint256 | nPrivateSendSalt |
Pulled from wallet DB ("ps_salt") and used when mixing a random number of rounds. More... | |
Friends | |
class | WalletRescanReserver |
Additional Inherited Members | |
Protected Member Functions inherited from CCryptoKeyStore | |
bool | SetCrypted () |
bool | EncryptKeys (CKeyingMaterial &vMasterKeyIn) |
will encrypt previously unencrypted keys More... | |
bool | EncryptHDChain (const CKeyingMaterial &vMasterKeyIn) |
bool | DecryptHDChain (CHDChain &hdChainRet) const |
bool | SetHDChain (const CHDChain &chain) |
bool | SetCryptedHDChain (const CHDChain &chain) |
bool | Unlock (const CKeyingMaterial &vMasterKeyIn, bool fForMixingOnly=false) |
Protected Member Functions inherited from CValidationInterface | |
virtual void | AcceptedBlockHeader (const CBlockIndex *pindexNew) |
virtual void | NotifyHeaderTip (const CBlockIndex *pindexNew, bool fInitialDownload) |
virtual void | UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) |
Notifies listeners of updated block chain tip. More... | |
virtual void | SynchronousUpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) |
Same as UpdatedBlockTip, but called from the caller's thread. More... | |
virtual void | NotifyGovernanceVote (const CGovernanceVote &vote) |
virtual void | NotifyGovernanceObject (const CGovernanceObject &object) |
virtual void | NotifyInstantSendDoubleSpendAttempt (const CTransaction ¤tTx, const CTransaction &previousTx) |
virtual void | NotifyMasternodeListChanged (bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff) |
virtual void | BlockChecked (const CBlock &, const CValidationState &) |
Notifies listeners of a block validation result. More... | |
virtual void | NewPoWValidBlock (const CBlockIndex *pindex, const std::shared_ptr< const CBlock > &block) |
Notifies listeners that a block which builds directly on our current tip has been received and connected to the headers tree, though not validated yet. More... | |
friend | void ::RegisterValidationInterface (CValidationInterface *) |
friend | void ::UnregisterValidationInterface (CValidationInterface *) |
friend | void ::UnregisterAllValidationInterfaces () |
Protected Attributes inherited from CCryptoKeyStore | |
CryptedKeyMap | mapCryptedKeys |
Protected Attributes inherited from CBasicKeyStore | |
KeyMap | mapKeys |
WatchKeyMap | mapWatchKeys |
ScriptMap | mapScripts |
WatchOnlySet | setWatchOnly |
CHDChain | hdChain |
Protected Attributes inherited from CKeyStore | |
CCriticalSection | cs_KeyStore |
Detailed Description
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, and provides the ability to create new transactions.
Member Typedef Documentation
◆ MasterKeyMap
typedef std::map<unsigned int, CMasterKey> CWallet::MasterKeyMap |
◆ TxItems
typedef std::multimap<int64_t, TxPair > CWallet::TxItems |
◆ TxPair
typedef std::pair<CWalletTx*, CAccountingEntry*> CWallet::TxPair |
◆ TxSpends
|
private |
Constructor & Destructor Documentation
◆ CWallet()
|
inline |
◆ ~CWallet()
|
inline |
Definition at line 868 of file wallet.h.
References encrypted_batch.
Member Function Documentation
◆ AbortRescan()
|
inline |
◆ AddDestData()
bool CWallet::AddDestData | ( | const CTxDestination & | dest, |
const std::string & | key, | ||
const std::string & | value | ||
) |
Adds a destination data tuple to the store, and saves it to disk.
Definition at line 4972 of file wallet.cpp.
References EncodeDestination(), mapAddressBook, and WalletBatch::WriteDestData().
Referenced by WalletModel::saveReceiveRequest().
◆ AutoBackupWallet()
bool CWallet::AutoBackupWallet | ( | const fs::path & | wallet_path, |
std::string & | strBackupWarningRet, | ||
std::string & | strBackupErrorRet | ||
) |
Definition at line 5327 of file wallet.cpp.
References _(), BackupWallet(), cs_main, cs_wallet, GUIUtil::dateTimeStr(), DateTimeStrFormat(), BerkeleyEnvironment::Directory(), error(), GetBackupsDir(), GetTime(), GetWalletEnv(), CCryptoKeyStore::IsLocked(), KeypoolCountExternalKeys(), LOCK2, LogPrintf, m_name, nKeysLeftSinceAutoBackup, nWalletBackups, and strprintf.
Referenced by WalletModel::autoBackupWallet().
◆ BackupWallet()
bool CWallet::BackupWallet | ( | const std::string & | strDest | ) |
Definition at line 5320 of file wallet.cpp.
References database.
Referenced by AutoBackupWallet(), WalletModel::backupWallet(), and backupwallet().
◆ CanSupportFeature()
|
inline |
check whether we are allowed to upgrade (or already support) to the named feature
Definition at line 917 of file wallet.h.
References AssertLockHeld(), cs_wallet, and nWalletMaxVersion.
Referenced by GenerateNewKey().
◆ ComputeTimeSmart()
unsigned int CWallet::ComputeTimeSmart | ( | const CWalletTx & | wtx | ) | const |
Compute smart timestamp for a transaction being added to the wallet.
Logic:
- If sending a transaction, assign its timestamp to the current time.
- If receiving a transaction outside a block, assign its timestamp to the current time.
- If receiving a block with a future timestamp, assign all its (not already known) transactions' timestamps to the current time.
- If receiving a block with a past timestamp, before the most recent known transaction (that we care about), assign all its (not already known) transactions' timestamps to the same timestamp as that most-recent-known transaction.
- If receiving a block with a past timestamp, but after the most recent known transaction, assign all its (not already known) transactions' timestamps to the block time.
For more information see CWalletTx::nTimeSmart, https://bitcointalk.org/?topic=54527, or https://github.com/bitcoin/bitcoin/pull/1393.
Definition at line 4928 of file wallet.cpp.
References CMerkleTx::GetHash(), CMerkleTx::hashBlock, CMerkleTx::hashUnset(), LogPrintf, mapBlockIndex, CAccountingEntry::nTime, CWalletTx::nTimeReceived, CWalletTx::nTimeSmart, base_blob< BITS >::ToString(), and wtxOrdered.
Referenced by AddToWallet().
◆ CreateWalletFromFile()
|
static |
Definition at line 5075 of file wallet.cpp.
References _(), BLOCK_HAVE_DATA, chainActive, CLIENT_VERSION, BerkeleyDatabase::Create(), DB_CORRUPT, DB_LOAD_OK, DB_NEED_REWRITE, DB_NONCRITICAL_ERROR, DB_TOO_NEW, DEFAULT_USE_HD_WALLET, DEFAULT_WALLETBROADCAST, FEATURE_HD, FEATURE_LATEST, CWalletTx::fFromMe, FindForkInGlobalIndex(), fPruneMode, gArgs, CChain::Genesis(), ArgsManager::GetArg(), CBlockIndex::GetBlockTime(), ArgsManager::GetBoolArg(), CChain::GetLocator(), GetTimeMillis(), GetVersion(), CChain::Height(), InitError(), CClientUIInterface::InitMessage, InitWarning(), ArgsManager::IsArgSet(), CClientUIInterface::LoadWallet, LoadWallet(), LOCK, LogPrintf, CWalletTx::mapValue, name, CChain::Next(), CBlockIndex::nHeight, CWalletTx::nOrderPos, CBlockIndex::nStatus, CWalletTx::nTimeReceived, CWalletTx::nTimeSmart, CBlockIndex::nTx, CBlockIndex::pprev, WalletBatch::ReadBestBlock(), RegisterValidationInterface(), WalletRescanReserver::reserve(), CWalletTx::strFromAccount, strprintf, TIMESTAMP_WINDOW, CChain::Tip(), uiInterface, CWalletTx::vOrderForm, and WalletBatch::WriteTx().
Referenced by loadwallet(), and WalletInit::Open().
◆ EraseDestData()
bool CWallet::EraseDestData | ( | const CTxDestination & | dest, |
const std::string & | key | ||
) |
Erases a destination data tuple in the store and on disk.
Definition at line 4981 of file wallet.cpp.
References EncodeDestination(), WalletBatch::EraseDestData(), and mapAddressBook.
Referenced by WalletModel::saveReceiveRequest().
◆ GetAllReserveKeys()
|
inline |
Definition at line 1122 of file wallet.h.
References m_pool_key_to_index.
Referenced by dumpwallet().
◆ GetBroadcastTransactions()
|
inline |
Inquire whether this wallet broadcasts transactions.
Definition at line 1212 of file wallet.h.
References fBroadcastTransactions.
Referenced by CWalletTx::RelayWalletTransaction(), resendwallettransactions(), sendmany(), and SendMoney().
◆ GetDBHandle()
|
inline |
Get database handle used by this wallet.
Ideally this function would not be necessary.
Definition at line 841 of file wallet.h.
References database.
Referenced by CTransactionBuilder::CTransactionBuilder().
◆ GetDestData()
bool CWallet::GetDestData | ( | const CTxDestination & | dest, |
const std::string & | key, | ||
std::string * | value | ||
) | const |
Look up a destination data tuple in the store, return true if found false otherwise.
Definition at line 4994 of file wallet.cpp.
References mapAddressBook.
◆ GetDestValues()
std::vector< std::string > CWallet::GetDestValues | ( | const std::string & | prefix | ) | const |
Get all destination values matching a prefix.
Definition at line 5010 of file wallet.cpp.
References cs_wallet, LOCK, mapAddressBook, and prefix.
Referenced by WalletModel::loadReceiveRequests().
◆ GetKeyBirthTimes()
void CWallet::GetKeyBirthTimes | ( | std::map< CTxDestination, int64_t > & | mapKeyBirth | ) | const |
Definition at line 4856 of file wallet.cpp.
References AssertLockHeld(), chainActive, CChain::Contains(), cs_wallet, CCryptoKeyStore::GetKeys(), CMerkleTx::hashBlock, CChain::Height(), mapBlockIndex, mapKeyMetadata, mapWallet, CAffectedKeysVisitor::Process(), CTxOut::scriptPubKey, TIMESTAMP_WINDOW, and CMerkleTx::tx.
Referenced by dumpwallet().
◆ GetKeyPoolSize()
|
inline |
Definition at line 1162 of file wallet.h.
References AssertLockHeld(), cs_wallet, setExternalKeyPool, and setInternalKeyPool.
Referenced by keypoolrefill().
◆ GetName()
|
inline |
Get a name for this wallet for logging/debugging purposes.
Definition at line 848 of file wallet.h.
References m_name.
Referenced by getwalletinfo(), loadwallet(), and walletpassphrase().
◆ GetVersion()
|
inline |
get the current wallet format (the oldest client version guaranteed to understand this wallet)
Definition at line 1175 of file wallet.h.
References cs_wallet, LOCK, and nWalletVersion.
Referenced by CreateWalletFromFile(), and getwalletinfo().
◆ InitAutoBackup()
|
static |
Definition at line 5309 of file wallet.cpp.
References DEFAULT_DISABLE_WALLET, gArgs, ArgsManager::GetArg(), ArgsManager::GetBoolArg(), and nWalletBackups.
Referenced by WalletInit::InitAutoBackup().
◆ IsAbortingRescan()
|
inline |
Definition at line 978 of file wallet.h.
References fAbortRescan.
Referenced by abortrescan(), and rescanblockchain().
◆ IsScanning()
|
inline |
◆ LoadDestData()
bool CWallet::LoadDestData | ( | const CTxDestination & | dest, |
const std::string & | key, | ||
const std::string & | value | ||
) |
Adds a destination data tuple to the store, without saving it to disk.
Definition at line 4988 of file wallet.cpp.
References mapAddressBook.
Referenced by ReadKeyValue().
◆ LoadKey()
Adds a key to the store, without saving it to disk (used by LoadWallet)
Definition at line 1000 of file wallet.h.
References CCryptoKeyStore::AddKeyPubKey().
Referenced by ReadKeyValue().
◆ LoadMinVersion()
|
inline |
Definition at line 1005 of file wallet.h.
References AssertLockHeld(), cs_wallet, nWalletMaxVersion, and nWalletVersion.
Referenced by WalletBatch::LoadWallet().
◆ NotifyChainLock()
|
overridevirtual |
Reimplemented from CValidationInterface.
Definition at line 5468 of file wallet.cpp.
References CBlockIndex::nHeight, and NotifyChainLockReceived.
◆ NotifyTransactionLock()
|
overridevirtual |
Reimplemented from CValidationInterface.
Definition at line 5450 of file wallet.cpp.
References cs_wallet, CT_UPDATED, gArgs, ArgsManager::GetArg(), CTransaction::GetHash(), base_blob< BITS >::GetHex(), LOCK, mapWallet, NotifyISLockReceived, NotifyTransactionChanged, and runCommand().
◆ postInitProcess()
void CWallet::postInitProcess | ( | ) |
Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init tasks.
Definition at line 5302 of file wallet.cpp.
References ReacceptWalletTransactions().
Referenced by loadwallet().
◆ SetBroadcastTransactions()
|
inline |
Set whether this wallet broadcasts transactions.
Definition at line 1214 of file wallet.h.
References fBroadcastTransactions.
◆ SetNull()
|
inline |
Definition at line 874 of file wallet.h.
References encrypted_batch, fAbortRescan, fAnonymizableTallyCached, fAnonymizableTallyCachedNonDenom, fBroadcastTransactions, FEATURE_BASE, fScanningWallet, m_max_keypool_index, nAccountingEntryNumber, nLastResend, nMasterKeyMaxID, nNextResend, nOrderPosNext, nRelockTime, nTimeFirstKey, nWalletMaxVersion, nWalletVersion, vecAnonymizableTallyCached, and vecAnonymizableTallyCachedNonDenom.
Referenced by CWallet().
◆ SignTransaction()
bool CWallet::SignTransaction | ( | CMutableTransaction & | tx | ) |
◆ Verify()
|
static |
Verify wallet naming and perform salvage on the wallet if required.
Definition at line 5024 of file wallet.cpp.
References BerkeleyDatabase::Create(), BerkeleyDatabase::CreateDummy(), cs_wallets, GetWalletDir(), GetWallets(), LOCK, WalletBatch::Recover(), WalletBatch::RecoverKeysOnlyFilter(), strprintf, WalletBatch::VerifyDatabaseFile(), and WalletBatch::VerifyEnvironment().
Referenced by loadwallet(), and WalletInit::Verify().
Friends And Related Function Documentation
◆ WalletRescanReserver
|
friend |
Member Data Documentation
◆ cs_wallet
|
mutable |
Definition at line 836 of file wallet.h.
Referenced by WalletModel::abandonTransaction(), AbandonTransaction(), abandontransaction(), AddCryptedKey(), AddHDPubKey(), AddKey(), AddKeyPubKeyWithDB(), addmultisigaddress(), AddressTableModel::addRow(), AddToWallet(), AddToWalletIfInvolvingMe(), AddTx(), AutoBackupWallet(), AutoLockMasternodeCollaterals(), AvailableCoins(), backupwallet(), BlockConnected(), BlockDisconnected(), BlockUntilSyncedToCurrentChain(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), CanSupportFeature(), WalletModel::changePassphrase(), ChangeWalletPassphrase(), CoinSelection(), CommitTransaction(), CountInputsWithAmount(), CreateCollateralTransaction(), CreateTransaction(), CTransactionBuilder::CTransactionBuilder(), DelAddressBook(), TransactionTablePriv::describe(), dumphdinfo(), dumpprivkey(), dumpwallet(), EncryptWallet(), encryptwallet(), FundTransaction(), GenerateNewKey(), getaccount(), getaccountaddress(), GetAccountAddresses(), GetAddressBalances(), getaddressesbyaccount(), GetAddressGroupings(), GetAnonymizedBalance(), GetAvailableBalance(), GetAverageAnonymizedRounds(), getbalance(), GetBalance(), GetCappedOutpointPrivateSendRounds(), GetCollateralTxDSIn(), GetConflicts(), GetDebit(), GetDecryptedHDChain(), GetDenominatedBalance(), GetDestValues(), GetImmatureBalance(), GetImmatureWatchOnlyBalance(), GetKey(), GetKeyBirthTimes(), GetKeyFromPool(), GetKeyPoolSize(), GetLegacyBalance(), getnewaddress(), GetNormalizedAnonymizedBalance(), GetOldestKeyPoolTime(), WalletModel::getOutputs(), GetPubKey(), getrawchangeaddress(), GetRealOutpointPrivateSendRounds(), getreceivedbyaccount(), getreceivedbyaddress(), GetSpendableTXs(), gettransaction(), TransactionTablePriv::getTxHex(), getunconfirmedbalance(), GetUnconfirmedBalance(), GetUnconfirmedWatchOnlyBalance(), GetVersion(), getwalletinfo(), GetWalletTx(), GetWatchOnlyBalance(), HaveKey(), importaddress(), importelectrumwallet(), importmulti(), importprivkey(), importprunedfunds(), importpubkey(), importwallet(), IncOrderPosNext(), TransactionTablePriv::index(), IsAllFromMe(), IsChange(), IsDenominated(), WalletModel::isLockedCoin(), IsLockedCoin(), IsMine(), WalletModel::isSpent(), KeypoolCountExternalKeys(), KeypoolCountInternalKeys(), keypoolrefill(), AddressTableModel::labelForDestination(), listaccounts(), listaddressbalances(), listaddressgroupings(), ListCoins(), WalletModel::listLockedCoins(), ListLockedCoins(), listlockunspent(), WalletModel::listProTxCoins(), ListProTxCoins(), listreceivedbyaccount(), listreceivedbyaddress(), listsinceblock(), listtransactions(), listunspent(), LoadHDPubKey(), LoadKeyMetadata(), LoadKeyPool(), LoadMinVersion(), LoadScriptMetadata(), WalletBatch::LoadWallet(), LoadWallet(), WalletModel::lockCoin(), LockCoin(), lockunspent(), LockWallet(), MarkConflicted(), MarkDirty(), MarkReserveKeysAsUsed(), movecmd(), NewKeyPool(), NotifyTransactionLock(), WalletModel::pollBalanceChanged(), WalletModel::prepareTransaction(), protx_list(), ReacceptWalletTransactions(), WalletBatch::RecoverKeysOnlyFilter(), AddressTablePriv::refreshAddressTable(), TransactionTablePriv::refreshWallet(), removeprunedfunds(), AddressTableModel::removeRows(), RemoveWatchOnly(), ReorderTransactions(), resendwallettransactions(), ResendWalletTransactionsBefore(), ReserveKeyFromKeyPool(), ReturnKey(), WalletModel::saveReceiveRequest(), ScanForWalletTransactions(), SelectCoinsGroupedByAddresses(), WalletModel::sendCoins(), sendfrom(), sendmany(), sendtoaddress(), setaccount(), SetAddressBook(), SetCryptedHDChain(), AddressTableModel::setData(), SetHDChain(), SetMaxVersion(), SetMinVersion(), settxfee(), signmessage(), signrawtransaction(), TransactionDesc::toHTML(), TopUpKeyPool(), TransactionAddedToMempool(), TransactionCanBeAbandoned(), TransactionRemovedFromMempool(), Unlock(), UnlockAllCoins(), WalletModel::unlockCoin(), UnlockCoin(), TransactionRecord::updateStatus(), UpdateTimeFirstKey(), TransactionTablePriv::updateWallet(), validateaddress(), walletlock(), walletpassphrase(), walletpassphrasechange(), ZapSelectTx(), and ZapWalletTx().
◆ database
|
private |
Internal database handle.
Definition at line 799 of file wallet.h.
Referenced by AbandonTransaction(), AccountMove(), AddAccountingEntry(), AddKeyPubKey(), AddToWallet(), BackupWallet(), EncryptWallet(), Flush(), GetAccountDestination(), GetDBHandle(), GetKeyFromPool(), GetOldestKeyPoolTime(), InitPrivateSendSalt(), KeepKey(), ListAccountCreditDebit(), LoadWallet(), MarkConflicted(), MarkReserveKeysAsUsed(), NewKeyPool(), ReorderTransactions(), ReserveKeyFromKeyPool(), SetBestChain(), SetCryptedHDChainSingle(), SetHDChainSingle(), SetMinVersion(), TopUpKeyPool(), ZapSelectTx(), and ZapWalletTx().
◆ encrypted_batch
|
private |
Definition at line 731 of file wallet.h.
Referenced by AddCryptedKey(), AddKeyPubKeyWithDB(), EncryptWallet(), SetCryptedHDChain(), SetNull(), and ~CWallet().
◆ fAbortRescan
|
private |
Definition at line 718 of file wallet.h.
Referenced by AbortRescan(), IsAbortingRescan(), ScanForWalletTransactions(), and SetNull().
◆ fallbackFee
|
static |
If fee estimation does not have enough data to provide estimates, use this fee instead.
Has no effect if not using fee estimation Override with -fallbackfee
Definition at line 1106 of file wallet.h.
Referenced by GetMinimumFee(), and WalletInit::ParameterInteraction().
◆ fAnonymizableTallyCached
|
mutableprivate |
Definition at line 743 of file wallet.h.
Referenced by AbandonTransaction(), AddToWallet(), BlockConnected(), BlockDisconnected(), LockCoin(), MarkConflicted(), MarkDirty(), SelectCoinsGroupedByAddresses(), SetNull(), SyncTransaction(), and UnlockCoin().
◆ fAnonymizableTallyCachedNonDenom
|
mutableprivate |
Definition at line 745 of file wallet.h.
Referenced by AbandonTransaction(), AddToWallet(), BlockConnected(), BlockDisconnected(), LockCoin(), MarkConflicted(), MarkDirty(), SelectCoinsGroupedByAddresses(), SetNull(), SyncTransaction(), and UnlockCoin().
◆ fBroadcastTransactions
|
private |
Definition at line 741 of file wallet.h.
Referenced by CommitTransaction(), GetBroadcastTransactions(), ReacceptWalletTransactions(), ResendWalletTransactions(), SetBroadcastTransactions(), and SetNull().
◆ fScanningWallet
|
private |
Definition at line 719 of file wallet.h.
Referenced by WalletRescanReserver::isReserved(), IsScanning(), WalletRescanReserver::reserve(), SetNull(), and WalletRescanReserver::~WalletRescanReserver().
◆ hashPrevBestCoinbase
|
private |
Definition at line 803 of file wallet.h.
Referenced by BlockConnected().
◆ laccentries
std::list<CAccountingEntry> CWallet::laccentries |
Definition at line 897 of file wallet.h.
Referenced by AddAccountingEntry(), listaccounts(), and WalletBatch::LoadWallet().
◆ m_discard_rate
|
static |
Definition at line 1107 of file wallet.h.
Referenced by GetDiscardRate(), and WalletInit::ParameterInteraction().
◆ m_last_block_processed
|
private |
The following is used to keep track of how far behind the wallet is from the chain sync, and to allow clients to block on us being caught up.
Note that this is not how far we've processed, we may need some rescan to have seen all transactions in the chain, but is only used to track live BlockConnected callbacks.
Protected by cs_main (see BlockUntilSyncedToCurrentChain)
Definition at line 818 of file wallet.h.
Referenced by BlockConnected(), and BlockUntilSyncedToCurrentChain().
◆ m_max_keypool_index
|
private |
Definition at line 775 of file wallet.h.
Referenced by LoadKeyPool(), SetNull(), and TopUpKeyPool().
◆ m_name
|
private |
Wallet filename from wallet=<path> command line or config option.
Used in debug logs and to send RPCs to the right wallet instance when more than one wallet is loaded.
Definition at line 796 of file wallet.h.
Referenced by AutoBackupWallet(), and GetName().
◆ m_pool_key_to_index
|
private |
Definition at line 776 of file wallet.h.
Referenced by AddToWalletIfInvolvingMe(), GetAllReserveKeys(), LoadKeyPool(), LoadWallet(), MarkReserveKeysAsUsed(), NewKeyPool(), ReserveKeyFromKeyPool(), ReturnKey(), TopUpKeyPool(), ZapSelectTx(), and ZapWalletTx().
◆ m_script_metadata
std::map<CScriptID, CKeyMetadata> CWallet::m_script_metadata |
Definition at line 856 of file wallet.h.
Referenced by AddWatchOnly(), dumpwallet(), importwallet(), LoadScriptMetadata(), and validateaddress().
◆ mapAddressBook
std::map<CTxDestination, CAddressBookData> CWallet::mapAddressBook |
Definition at line 906 of file wallet.h.
Referenced by AddDestData(), AddressTableModel::addRow(), DelAddressBook(), dumpwallet(), EraseDestData(), getaccount(), GetAccountAddresses(), GetAccountName(), getaddressesbyaccount(), GetDestData(), GetDestValues(), IsChange(), AddressTableModel::labelForDestination(), listaccounts(), listaddressgroupings(), ListReceived(), ListTransactions(), listunspent(), LoadDestData(), ReadKeyValue(), AddressTablePriv::refreshAddressTable(), WalletModel::sendCoins(), setaccount(), SetAddressBook(), AddressTableModel::setData(), TransactionDesc::toHTML(), TransactionRecord::updateStatus(), and validateaddress().
◆ mapHdPubKeys
Definition at line 912 of file wallet.h.
Referenced by AddHDPubKey(), dumpwallet(), GetKey(), GetPubKey(), HaveKey(), LoadHDPubKey(), LoadWallet(), and validateaddress().
◆ mapKeyMetadata
std::map<CKeyID, CKeyMetadata> CWallet::mapKeyMetadata |
Definition at line 853 of file wallet.h.
Referenced by AddCryptedKey(), AddHDPubKey(), AddKeyPubKeyWithDB(), BOOST_FIXTURE_TEST_CASE(), DeriveNewChildKey(), GenerateNewKey(), GetKeyBirthTimes(), importprivkey(), importwallet(), LoadKeyMetadata(), LoadKeyPool(), ProcessImport(), and validateaddress().
◆ mapMasterKeys
MasterKeyMap CWallet::mapMasterKeys |
Definition at line 859 of file wallet.h.
Referenced by ChangeWalletPassphrase(), EncryptWallet(), ReadKeyValue(), and Unlock().
◆ mapOutpointRoundsCache
|
mutableprivate |
Definition at line 759 of file wallet.h.
Referenced by GetRealOutpointPrivateSendRounds().
◆ mapTxSpends
|
private |
Definition at line 754 of file wallet.h.
Referenced by AbandonTransaction(), AddToSpends(), AddToWalletIfInvolvingMe(), GetConflicts(), IsSpent(), and MarkConflicted().
◆ mapWallet
Definition at line 896 of file wallet.h.
Referenced by AbandonTransaction(), abandontransaction(), AddToSpends(), AddToWallet(), AddToWalletIfInvolvingMe(), AddTx(), AutoLockMasternodeCollaterals(), BlockConnected(), BOOST_FIXTURE_TEST_CASE(), CommitTransaction(), CountInputsWithAmount(), TransactionTablePriv::describe(), FindNonChangeParentOutput(), GetAccountDestination(), GetAddressBalances(), GetAddressGroupings(), GetConflicts(), GetDebit(), GetKeyBirthTimes(), GetLegacyBalance(), GetNormalizedAnonymizedBalance(), WalletModel::getOutputs(), getreceivedbyaccount(), getreceivedbyaddress(), GetSpendableTXs(), gettransaction(), TransactionTablePriv::getTxHex(), getwalletinfo(), GetWalletTx(), TransactionTablePriv::index(), IsAllFromMe(), IsDenominated(), IsMine(), IsSpent(), listaccounts(), ListCoins(), ListProTxCoins(), ListReceived(), listsinceblock(), LoadToWallet(), WalletBatch::LoadWallet(), LoadWallet(), LockCoin(), lockunspent(), MarkConflicted(), MarkDirty(), NotifyTransactionChanged(), NotifyTransactionLock(), ReacceptWalletTransactions(), TransactionTablePriv::refreshWallet(), ReorderTransactions(), ResendWalletTransactionsBefore(), SelectCoins(), SelectCoinsGroupedByAddresses(), SyncMetaData(), SyncTransaction(), TransactionAddedToMempool(), TransactionRemovedFromMempool(), UnlockCoin(), TransactionTablePriv::updateWallet(), and ZapSelectTx().
◆ minTxFee
|
static |
Fees smaller than this (in duffs) are considered zero fee (for transaction creation) Override with -mintxfee.
Definition at line 1105 of file wallet.h.
Referenced by GetRequiredFee(), and WalletInit::ParameterInteraction().
◆ mutexScanning
|
private |
Definition at line 720 of file wallet.h.
Referenced by WalletRescanReserver::reserve(), and WalletRescanReserver::~WalletRescanReserver().
◆ nAccountingEntryNumber
uint64_t CWallet::nAccountingEntryNumber |
Definition at line 904 of file wallet.h.
Referenced by AddAccountingEntry(), ReadKeyValue(), and SetNull().
◆ nKeysLeftSinceAutoBackup
int64_t CWallet::nKeysLeftSinceAutoBackup |
Definition at line 910 of file wallet.h.
Referenced by AutoBackupWallet(), WalletModel::getKeysLeftSinceAutoBackup(), getprivatesendinfo(), getwalletinfo(), KeepKey(), WalletBatch::LoadWallet(), LoadWallet(), NewKeyPool(), and ZapWalletTx().
◆ nLastResend
|
private |
Definition at line 740 of file wallet.h.
Referenced by ResendWalletTransactions(), and SetNull().
◆ nMasterKeyMaxID
unsigned int CWallet::nMasterKeyMaxID |
Definition at line 860 of file wallet.h.
Referenced by EncryptWallet(), ReadKeyValue(), and SetNull().
◆ nNextResend
|
private |
Definition at line 739 of file wallet.h.
Referenced by ResendWalletTransactions(), and SetNull().
◆ nOrderPosNext
int64_t CWallet::nOrderPosNext |
Definition at line 903 of file wallet.h.
Referenced by IncOrderPosNext(), ReadKeyValue(), ReorderTransactions(), and SetNull().
◆ NotifyAddressBookChanged
boost::signals2::signal<void (CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, const std::string &purpose, ChangeType status)> CWallet::NotifyAddressBookChanged |
Address book entry changed.
- Note
- called with lock cs_wallet held.
Definition at line 1190 of file wallet.h.
Referenced by DelAddressBook(), SetAddressBook(), TransactionTableModel::subscribeToCoreSignals(), WalletModel::subscribeToCoreSignals(), TransactionTableModel::unsubscribeFromCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ NotifyChainLockReceived
boost::signals2::signal<void (int height)> CWallet::NotifyChainLockReceived |
ChainLock received.
Definition at line 1209 of file wallet.h.
Referenced by NotifyChainLock(), WalletModel::subscribeToCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ NotifyISLockReceived
boost::signals2::signal<void ()> CWallet::NotifyISLockReceived |
IS-lock received.
Definition at line 1206 of file wallet.h.
Referenced by NotifyTransactionLock(), WalletModel::subscribeToCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ NotifyTransactionChanged
boost::signals2::signal<void (CWallet *wallet, const uint256 &hashTx, ChangeType status)> CWallet::NotifyTransactionChanged |
Wallet transaction added, removed or updated.
- Note
- called with lock cs_wallet held.
Definition at line 1197 of file wallet.h.
Referenced by AbandonTransaction(), AddToWallet(), BlockConnected(), CommitTransaction(), NotifyTransactionLock(), TransactionTableModel::subscribeToCoreSignals(), WalletModel::subscribeToCoreSignals(), TransactionTableModel::unsubscribeFromCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ NotifyWatchonlyChanged
boost::signals2::signal<void (bool fHaveWatchOnly)> CWallet::NotifyWatchonlyChanged |
Watch-only address added.
Definition at line 1203 of file wallet.h.
Referenced by AddWatchOnly(), RemoveWatchOnly(), WalletModel::subscribeToCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ nPrivateSendSalt
|
private |
Pulled from wallet DB ("ps_salt") and used when mixing a random number of rounds.
This salt is needed to prevent an attacker from learning how many extra times the input was mixed based only on information in the blockchain.
Definition at line 824 of file wallet.h.
Referenced by InitPrivateSendSalt(), and IsFullyMixed().
◆ nRelockTime
int64_t CWallet::nRelockTime |
Holds a timestamp at which point the wallet is scheduled (externally) to be relocked. Caller must arrange for actual relocking to occur via Lock().
Definition at line 1034 of file wallet.h.
Referenced by getwalletinfo(), LockWallet(), SetNull(), walletlock(), and walletpassphrase().
◆ nTimeFirstKey
|
private |
Definition at line 778 of file wallet.h.
Referenced by SetNull(), and UpdateTimeFirstKey().
◆ nWalletMaxVersion
|
private |
the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded
Definition at line 737 of file wallet.h.
Referenced by CanSupportFeature(), LoadMinVersion(), SetMaxVersion(), SetMinVersion(), and SetNull().
◆ nWalletVersion
|
private |
the current wallet version: clients below this version are not able to load the wallet
Definition at line 734 of file wallet.h.
Referenced by GetVersion(), LoadMinVersion(), SetMaxVersion(), SetMinVersion(), and SetNull().
◆ setExternalKeyPool
|
private |
Definition at line 774 of file wallet.h.
Referenced by GetKeyPoolSize(), GetOldestKeyPoolTime(), KeypoolCountExternalKeys(), LoadKeyPool(), LoadWallet(), MarkReserveKeysAsUsed(), NewKeyPool(), ReserveKeyFromKeyPool(), ReturnKey(), TopUpKeyPool(), ZapSelectTx(), and ZapWalletTx().
◆ setInternalKeyPool
|
private |
Definition at line 773 of file wallet.h.
Referenced by GetKeyPoolSize(), GetOldestKeyPoolTime(), KeypoolCountInternalKeys(), LoadKeyPool(), LoadWallet(), MarkReserveKeysAsUsed(), NewKeyPool(), ReserveKeyFromKeyPool(), ReturnKey(), TopUpKeyPool(), ZapSelectTx(), and ZapWalletTx().
◆ setLockedCoins
std::set<COutPoint> CWallet::setLockedCoins |
Definition at line 908 of file wallet.h.
Referenced by IsLockedCoin(), ListLockedCoins(), LockCoin(), UnlockAllCoins(), and UnlockCoin().
◆ setWalletUTXO
|
private |
Definition at line 758 of file wallet.h.
Referenced by AddToSpends(), AddToWallet(), CountInputsWithAmount(), GetAverageAnonymizedRounds(), GetNormalizedAnonymizedBalance(), GetSpendableTXs(), ListProTxCoins(), LoadWallet(), and SelectCoinsGroupedByAddresses().
◆ ShowProgress
boost::signals2::signal<void (const std::string &title, int nProgress)> CWallet::ShowProgress |
Show progress e.g.
for rescan
Definition at line 1200 of file wallet.h.
Referenced by importelectrumwallet(), importwallet(), ScanForWalletTransactions(), TransactionTableModel::subscribeToCoreSignals(), WalletModel::subscribeToCoreSignals(), TransactionTableModel::unsubscribeFromCoreSignals(), and WalletModel::unsubscribeFromCoreSignals().
◆ vecAnonymizableTallyCached
|
mutableprivate |
Definition at line 744 of file wallet.h.
Referenced by SelectCoinsGroupedByAddresses(), and SetNull().
◆ vecAnonymizableTallyCachedNonDenom
|
mutableprivate |
Definition at line 746 of file wallet.h.
Referenced by SelectCoinsGroupedByAddresses(), and SetNull().
◆ wtxOrdered
TxItems CWallet::wtxOrdered |
Definition at line 901 of file wallet.h.
Referenced by AddAccountingEntry(), AddToWallet(), ComputeTimeSmart(), listtransactions(), LoadToWallet(), WalletBatch::LoadWallet(), and ZapSelectTx().
The documentation for this class was generated from the following files:
- src/wallet/wallet.h
- src/wallet/wallet.cpp