PIVX Core  5.6.99
P2P Digital Currency
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
CWallet Class Referenceabstract

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>

Inheritance diagram for CWallet:
[legend]
Collaboration diagram for CWallet:
[legend]

Classes

struct  AvailableCoinsFilter
 
struct  Balance
 
struct  CommitResult
 
struct  OutputAvailabilityResult
 

Public Types

enum  CommitStatus { OK , Abandoned , NotAccepted }
 
typedef std::map< unsigned int, CMasterKeyMasterKeyMap
 
typedef std::multimap< int64_t, CWalletTx * > TxItems
 

Public Member Functions

bool SetupSPKM (bool newKeypool=true, bool memOnly=false)
 Generates hd wallet //. More...
 
bool IsHDEnabled () const
 Whether the wallet is hd or not //. More...
 
bool IsSaplingUpgradeEnabled () const
 Whether the wallet supports Sapling or not //. More...
 
int GetLastBlockHeight () const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Get last block processed height. More...
 
int GetLastBlockHeightLockWallet () const
 Get last block processed height locking the wallet. More...
 
void SetLastBlockProcessed (const CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet)
 Set last block processed height, currently only use in unit test. More...
 
const CKeyingMaterialGetEncryptionKey () const
 
bool HasEncryptionKeys () const
 
ScriptPubKeyManGetScriptPubKeyMan () const
 Get spkm. More...
 
SaplingScriptPubKeyManGetSaplingScriptPubKeyMan () const
 
bool HasSaplingSPKM () const
 
WalletDatabaseGetDBHandlePtr () const
 Get database handle used by this wallet. More...
 
WalletDatabaseGetDBHandle () const
 
const std::string & GetName () const
 Get a name for this wallet for logging/debugging purposes. More...
 
fs::path GetPathToDBFile ()
 Get the path to the wallet's db file. More...
 
 CWallet (std::string name, std::unique_ptr< WalletDatabase > dbw_in)
 Construct wallet with specified name and database implementation. More...
 
 ~CWallet ()
 
void SetNull ()
 
void SyncMetaDataN (std::pair< TxSpendMap< uint256 >::iterator, TxSpendMap< uint256 >::iterator > range)
 
const CWalletTxGetWalletTx (const uint256 &hash) const
 
std::vector< CWalletTxgetWalletTxs ()
 
std::string GetUniqueWalletBackupName () const
 
bool CanSupportFeature (enum WalletFeature wf)
 check whether we are allowed to upgrade (or already support) to the named feature More...
 
bool AvailableCoins (std::vector< COutput > *pCoins, const CCoinControl *coinControl=nullptr, AvailableCoinsFilter coinsFilter=AvailableCoinsFilter()) const
 populate vCoins with vector of available COutputs. More...
 
bool SelectCoinsToSpend (const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=nullptr) const
 

Available coins (spending)

More...
 
bool SelectCoinsMinConf (const CAmount &nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector< COutput > vCoins, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet) const
 Select coins until nTargetValue is reached. More...
 
bool StakeableCoins (std::vector< CStakeableOutput > *pCoins=nullptr)
 

Available coins (staking)

More...
 
void GetAvailableP2CSCoins (std::vector< COutput > &vCoins) const
 

Available coins (P2CS)

More...
 
std::map< CTxDestination, std::vector< COutput > > AvailableCoinsByAddress (bool fConfirmed, CAmount maxCoinValue, bool fIncludeColdStaking)
 
std::map< std::pair< CTxDestination, Optional< CTxDestination > >, std::vector< COutput > > ListCoins () const
 Return list of available coins and locked coins grouped by non-change output address. More...
 
std::map< libzcash::SaplingPaymentAddress, std::vector< SaplingNoteEntry > > ListNotes () const
 Return list of available shield notes and locked shield notes grouped by sapling address. More...
 
bool GetMasternodeVinAndKeys (CPubKey &pubKeyRet, CKey &keyRet, const COutPoint &collateralOut, bool fValidateCollateral, std::string &strError)
 Get 10000 PIV output and keys which can be used for the Masternode. More...
 
bool IsSaplingSpent (const SaplingOutPoint &op) const
 
bool IsSpent (const COutPoint &outpoint) const
 Outpoint is spent if any non-conflicted transaction spends it: More...
 
bool IsSpent (const uint256 &hash, unsigned int n) const
 
bool IsLockedCoin (const uint256 &hash, unsigned int n) const
 
bool IsLockedNote (const SaplingOutPoint &op) const
 
void LockCoin (const COutPoint &output)
 
void LockNote (const SaplingOutPoint &op)
 
void UnlockCoin (const COutPoint &output)
 
void UnlockNote (const SaplingOutPoint &op)
 
void UnlockAllCoins ()
 
void UnlockAllNotes ()
 
std::set< COutPointListLockedCoins ()
 
std::set< SaplingOutPointListLockedNotes ()
 
void AbortRescan ()
 
bool IsAbortingRescan ()
 
bool IsScanning ()
 
bool SetStakeSplitThreshold (const CAmount sst)
 
CAmount GetStakeSplitThreshold () const
 
void LockOutpointIfMine (const CTransactionRef &ptx, const COutPoint &c)
 
void LockOutpointIfMineWithMutex (const CTransactionRef &ptx, const COutPoint &c)
 
void LockIfMyCollateral (const CTransactionRef &ptx)
 
CallResult< CTxDestinationgetNewAddress (const std::string &addressLabel, const std::string purpose, const CChainParams::Base58Type addrType=CChainParams::PUBKEY_ADDRESS)
 
CallResult< CTxDestinationgetNewAddress (const std::string &label)
 
CallResult< CTxDestinationgetNewStakingAddress (const std::string &label)
 
int64_t GetKeyCreationTime (const CWDestination &dest)
 
int64_t GetKeyCreationTime (CPubKey pubkey)
 
int64_t GetKeyCreationTime (const CTxDestination &address)
 
int64_t GetKeyCreationTime (const libzcash::SaplingPaymentAddress &address)
 
bool FindNotesDataAndAddMissingIVKToKeystore (const CTransaction &tx, Optional< mapSaplingNoteData_t > &saplingNoteData)
 
void AddExternalNotesDataToTx (CWalletTx &wtx) const
 
libzcash::SaplingPaymentAddress GenerateNewSaplingZKey (std::string label="")
 Generates new Sapling key. More...
 
void IncrementNoteWitnesses (const CBlockIndex *pindex, const CBlock *pblock, SaplingMerkleTree &saplingTree)
 pindex is the new tip being connected. More...
 
void DecrementNoteWitnesses (const CBlockIndex *pindex)
 pindex is the old tip being disconnected. More...
 
void ClearNoteWitnessCache ()
 clear note witness cache More...
 
bool AddSaplingZKey (const libzcash::SaplingExtendedSpendingKey &key)
 Adds Sapling spending key to the store, and saves it to disk. More...
 
bool AddSaplingIncomingViewingKeyW (const libzcash::SaplingIncomingViewingKey &ivk, const libzcash::SaplingPaymentAddress &addr)
 
bool AddCryptedSaplingSpendingKeyW (const libzcash::SaplingExtendedFullViewingKey &extfvk, const std::vector< unsigned char > &vchCryptedSecret)
 
bool HaveSpendingKeyForPaymentAddress (const libzcash::SaplingPaymentAddress &zaddr) const
 Returns true if the wallet contains the spending key. More...
 
bool LoadSaplingZKey (const libzcash::SaplingExtendedSpendingKey &key)
 Adds spending key to the store, without saving it to disk (used by LoadWallet) More...
 
bool LoadSaplingZKeyMetadata (const libzcash::SaplingIncomingViewingKey &ivk, const CKeyMetadata &meta)
 Load spending key metadata (used by LoadWallet) More...
 
bool LoadSaplingPaymentAddress (const libzcash::SaplingPaymentAddress &addr, const libzcash::SaplingIncomingViewingKey &ivk)
 Adds a Sapling payment address -> incoming viewing key map entry, without saving it to disk (used by LoadWallet) More...
 
bool LoadCryptedSaplingZKey (const libzcash::SaplingExtendedFullViewingKey &extfvk, const std::vector< unsigned char > &vchCryptedSecret)
 Adds an encrypted spending key to the store, without saving it to disk (used by LoadWallet) More...
 
bool AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override
 Adds a key to the store, and saves it to disk. More...
 
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 CPubKey &pubkey, const CKeyMetadata &metadata)
 Load metadata (used by LoadWallet) More...
 
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...
 
std::vector< std::string > GetDestValues (const std::string &prefix) const
 Get all destination values matching a prefix. More...
 
bool AddWatchOnly (const CScript &dest) override
 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 Lock ()
 
bool Unlock (const SecureString &strWalletPassphrase, bool anonimizeOnly=false)
 
bool Unlock (const CKeyingMaterial &vMasterKeyIn)
 
bool ChangeWalletPassphrase (const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
 
bool EncryptWallet (const SecureString &strWalletPassphrase)
 
std::vector< CKeyIDGetAffectedKeys (const CScript &spk)
 
void GetKeyBirthTimes (std::map< CKeyID, int64_t > &mapKeyBirth) const EXCLUSIVE_LOCKS_REQUIRED(cs_main)
 
int64_t IncOrderPosNext (WalletBatch *batch=nullptr)
 Increment the next transaction order id. More...
 
void MarkDirty ()
 
bool AddToWallet (const CWalletTx &wtxIn, bool fFlushOnClose=true)
 
bool LoadToWallet (CWalletTx &wtxIn)
 
void TransactionAddedToMempool (const CTransactionRef &tx) override
 Notifies listeners of a transaction having been added to mempool. More...
 
void BlockConnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindex) override
 Notifies listeners of a block being connected. More...
 
void BlockDisconnected (const std::shared_ptr< const CBlock > &pblock, const uint256 &blockHash, int nBlockHeight, int64_t blockTime) override
 Notifies listeners of a block being disconnected. More...
 
bool AddToWalletIfInvolvingMe (const CTransactionRef &tx, const CWalletTx::Confirmation &confirm, bool fUpdate)
 Add a transaction to the wallet, or update it. More...
 
void EraseFromWallet (const uint256 &hash)
 
bool Upgrade (std::string &error, const int prevVersion)
 Upgrade wallet to HD and Sapling if needed. More...
 
bool ActivateSaplingWallet (bool memOnly=false)
 
int64_t RescanFromTime (int64_t startTime, const WalletRescanReserver &reserver, bool update)
 Scan active chain for relevant transactions after importing keys. More...
 
CBlockIndexScanForWalletTransactions (CBlockIndex *pindexStart, CBlockIndex *pindexStop, const WalletRescanReserver &reserver, bool fUpdate=false, bool fromStartup=false)
 Scan the block chain (starting in pindexStart) for transactions from or to us. More...
 
void TransactionRemovedFromMempool (const CTransactionRef &ptx, MemPoolRemovalReason reason) override
 Notifies listeners of a transaction leaving mempool. More...
 
void ReacceptWalletTransactions (bool fFirstLoad=false)
 
void ResendWalletTransactions (CConnman *connman) override
 Tells listeners to broadcast their data. More...
 
void UpdatedBlockTip (const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override
 Notifies listeners when the block chain tip advances. More...
 
Balance GetBalance (int min_depth=0) const
 
CAmount loopTxsBalance (const std::function< void(const uint256 &, const CWalletTx &, CAmount &)> &method) const
 
CAmount GetAvailableBalance (bool fIncludeDelegated=true, bool fIncludeShielded=true) const
 
CAmount GetAvailableBalance (isminefilter &filter, bool useCache=false, int minDepth=1) const
 
CAmount GetColdStakingBalance () const
 
CAmount GetImmatureColdStakingBalance () const
 
CAmount GetStakingBalance (const bool fIncludeColdStaking=true) const
 
CAmount GetDelegatedBalance () const
 
CAmount GetImmatureDelegatedBalance () const
 
CAmount GetLockedCoins () const
 
CAmount GetLockedShieldCoins () const
 
CAmount GetUnconfirmedBalance (isminetype filter=ISMINE_SPENDABLE_ALL) const
 
CAmount GetImmatureBalance () const
 
CAmount GetWatchOnlyBalance () const
 
CAmount GetUnconfirmedWatchOnlyBalance () const
 
CAmount GetImmatureWatchOnlyBalance () const
 
CAmount GetLegacyBalance (const isminefilter &filter, int minDepth) const
 
bool FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate &specificFeeRate, int &nChangePosInOut, std::string &strFailReason, bool includeWatching, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, const CTxDestination &destChange=CNoDestination())
 
bool CreateTransaction (const std::vector< CRecipient > &vecSend, CTransactionRef &txRet, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl *coinControl=nullptr, bool sign=true, CAmount nFeePay=0, bool fIncludeDelegated=false, bool *fStakeDelegationVoided=nullptr, int nExtraSize=0, int nMinDepth=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 CreateTransaction (CScript scriptPubKey, const CAmount &nValue, CTransactionRef &tx, CReserveKey &reservekey, CAmount &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl=nullptr, CAmount nFeePay=0, bool fIncludeDelegated=false, bool *fStakeDelegationVoided=nullptr, int nExtraSize=0, int nMinDepth=0)
 
CWallet::CommitResult CommitTransaction (CTransactionRef tx, CReserveKey &opReservekey, CConnman *connman)
 
CWallet::CommitResult CommitTransaction (CTransactionRef tx, CReserveKey *reservekey, CConnman *connman, mapValue_t *extraValues=nullptr)
 Call after CreateTransaction unless you want to abort. More...
 
bool CreateCoinstakeOuts (const CPivStake &stakeInput, std::vector< CTxOut > &vout, CAmount nTotal) const
 
bool CreateCoinStake (const CBlockIndex *pindexPrev, unsigned int nBits, CMutableTransaction &txNew, int64_t &nTxNewTime, std::vector< CStakeableOutput > *availableCoins, bool stopOnNewBlock=true) const
 
bool SignCoinStake (CMutableTransaction &txNew) const
 
void AutoCombineDust (CConnman *connman)
 
CAmount GetAvailableShieldedBalance (bool fUseCache=true) const
 
CAmount GetUnconfirmedShieldedBalance () const
 
size_t KeypoolCountExternalKeys ()
 
bool TopUpKeyPool (unsigned int kpSize=0)
 
void KeepKey (int64_t nIndex)
 
void ReturnKey (int64_t nIndex, const bool internal=false, const bool staking=false)
 
bool GetKeyFromPool (CPubKey &key, const uint8_t &type=HDChain::ChangeType::EXTERNAL)
 
int64_t GetOldestKeyPoolTime ()
 
std::set< std::set< CTxDestination > > GetAddressGroupings ()
 
std::map< CTxDestination, CAmountGetAddressBalances ()
 
std::set< CTxDestinationGetLabelAddresses (const std::string &label) const
 
bool CreateBudgetFeeTX (CTransactionRef &tx, const uint256 &hash, CReserveKey &keyChange, CAmount fee)
 
bool IsUsed (const CTxDestination address) const
 
bool IsUsed (const libzcash::SaplingPaymentAddress address) const
 
isminetype IsMine (const CTxIn &txin) const
 
CAmount GetDebit (const CTxIn &txin, const isminefilter &filter) const
 
isminetype IsMine (const CTxOut &txout) const
 
CAmount GetCredit (const CTxOut &txout, const isminefilter &filter) const
 
bool IsChange (const CTxOut &txout) const
 
bool IsChange (const CTxDestination &address) const
 
CAmount GetChange (const CTxOut &txout) const
 
bool IsMine (const CTransactionRef &tx) const
 
bool IsFromMe (const CTransactionRef &tx) const
 should probably be renamed to IsRelevantToMe More...
 
CAmount GetDebit (const CTransactionRef &tx, const isminefilter &filter) const
 
CAmount GetCredit (const CWalletTx &tx, const isminefilter &filter) const
 
CAmount GetChange (const CTransactionRef &tx) const
 
void SetBestChain (const CBlockLocator &loc) override
 Notifies listeners of the new active block chain on-disk. More...
 
void SetBestChainInternal (WalletBatch &batch, const CBlockLocator &loc)
 
void MarkAffectedTransactionsDirty (const CTransaction &tx)
 
DBErrors LoadWallet (bool &fFirstRunRet)
 
DBErrors ZapWalletTx (std::vector< CWalletTx > &vWtx)
 
bool SetAddressBook (const CWDestination &address, const std::string &strName, const std::string &purpose)
 
bool DelAddressBook (const CWDestination &address, const CChainParams::Base58Type addrType=CChainParams::PUBKEY_ADDRESS)
 
bool HasAddressBook (const CWDestination &address) const
 
bool HasDelegator (const CTxOut &out) const
 
int GetAddressBookSize () const
 
CAddressBookIterator NewAddressBookIterator ()
 
std::string GetPurposeForAddressBookEntry (const CWDestination &address) const
 
std::string GetNameForAddressBookEntry (const CWDestination &address) const
 
Optional< AddressBook::CAddressBookDataGetAddressBookEntry (const CWDestination &address) const
 
void LoadAddressBookName (const CWDestination &dest, const std::string &strName)
 
void LoadAddressBookPurpose (const CWDestination &dest, const std::string &strPurpose)
 
unsigned int GetKeyPoolSize ()
 
unsigned int GetStakingKeyPoolSize ()
 
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< uint256GetConflicts (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 AbandonTransaction (const uint256 &hashTx)
 
void postInitProcess (CScheduler &scheduler)
 Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init tasks. More...
 
bool BackupWallet (const std::string &strDest)
 Creates a wallet backup in strDest path. More...
 
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 () const
 
bool HaveKey (const CKeyID &address) const override
 Check whether a key corresponding to a given address is present in the store. More...
 
bool GetKey (const CKeyID &address, CKey &keyOut) const override
 
bool GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override
 
std::set< CKeyIDGetKeys () const override
 
virtual bool AddCryptedSaplingSpendingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk, const std::vector< unsigned char > &vchCryptedSecret)
 Sapling. More...
 
bool HaveSaplingSpendingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk) const override
 
bool GetSaplingSpendingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk, libzcash::SaplingExtendedSpendingKey &skOut) const override
 
- Public Member Functions inherited from CBasicKeyStore
bool GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
 
bool HaveKey (const CKeyID &address) const
 Check whether a key corresponding to a given address is present in the store. More...
 
bool HaveKey (const CExchangeKeyID &address) const
 
std::set< CKeyIDGetKeys () const
 
bool GetKey (const CKeyID &address, CKey &keyOut) const
 
virtual bool HaveCScript (const CScriptID &hash) const
 
virtual bool GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const
 
virtual bool HaveWatchOnly (const CScript &dest) const
 
virtual bool HaveWatchOnly () const
 
bool AddSaplingSpendingKey (const libzcash::SaplingExtendedSpendingKey &sk)
 Sapling. More...
 
bool HaveSaplingSpendingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk) const
 
bool GetSaplingSpendingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk, libzcash::SaplingExtendedSpendingKey &skOut) const
 
virtual bool AddSaplingFullViewingKey (const libzcash::SaplingExtendedFullViewingKey &extfvk)
 Support for Sapling full viewing keys. More...
 
virtual bool HaveSaplingFullViewingKey (const libzcash::SaplingIncomingViewingKey &ivk) const
 
virtual bool GetSaplingFullViewingKey (const libzcash::SaplingIncomingViewingKey &ivk, libzcash::SaplingExtendedFullViewingKey &extfvkOut) const
 
virtual bool AddSaplingIncomingViewingKey (const libzcash::SaplingIncomingViewingKey &ivk, const libzcash::SaplingPaymentAddress &addr)
 Sapling incoming viewing keys. More...
 
virtual bool HaveSaplingIncomingViewingKey (const libzcash::SaplingPaymentAddress &addr) const
 
virtual bool GetSaplingIncomingViewingKey (const libzcash::SaplingPaymentAddress &addr, libzcash::SaplingIncomingViewingKey &ivkOut) const
 
bool GetSaplingExtendedSpendingKey (const libzcash::SaplingPaymentAddress &addr, libzcash::SaplingExtendedSpendingKey &extskOut) const
 
void GetSaplingPaymentAddresses (std::set< libzcash::SaplingPaymentAddress > &setAddress) const
 
- Public Member Functions inherited from CKeyStore
virtual ~CKeyStore ()
 
virtual bool AddKey (const CKey &key)
 
- Public Member Functions inherited from CValidationInterface
virtual ~CValidationInterface ()=default
 
virtual void AcceptedBlockHeader (const CBlockIndex *pindexNew)
 

Static Public Member Functions

static std::string ParseIntoAddress (const CWDestination &dest, const std::string &purpose)
 
static CWalletCreateWalletFromFile (const std::string &name, const fs::path &path)
 

Public Attributes

RecursiveMutex cs_wallet
 
bool fWalletUnlockStaking
 
WalletBatchencrypted_batch
 
std::map< CKeyID, CKeyMetadatamapKeyMetadata
 
MasterKeyMap mapMasterKeys
 
unsigned int nMasterKeyMaxID
 
CAmount nStakeSplitThreshold
 
CStakerStatuspStakerStatus = nullptr
 
bool fUseCustomFee
 
CAmount nCustomFee
 
bool fCombineDust
 
CAmount nAutoCombineThreshold
 
int frequency
 
std::map< uint256, CWalletTxmapWallet
 
TxItems wtxOrdered
 
int64_t nOrderPosNext
 
std::set< COutPointsetLockedCoins
 
std::set< SaplingOutPointsetLockedNotes
 
int64_t nTimeFirstKey
 
int64_t nRelockTime
 Lock Wallet Holds a timestamp at which point the wallet is scheduled (externally) to be relocked. More...
 
boost::signals2::signal< void(CWallet *wallet, const CWDestination &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(const bool fSuccess, const std::string &filename)> NotifyWalletBacked
 notify wallet file backed up More...
 
boost::signals2::signal< void(const CAmount stakeSplitThreshold)> NotifySSTChanged
 notify stake-split threshold changed More...
 
- Public Attributes inherited from CCryptoKeyStore
boost::signals2::signal< void(CCryptoKeyStore *wallet)> NotifyStatusChanged
 Wallet status (encrypted, locked) changed. More...
 
- Public Attributes inherited from CBasicKeyStore
SaplingSpendingKeyMap mapSaplingSpendingKeys
 
SaplingFullViewingKeyMap mapSaplingFullViewingKeys
 
SaplingIncomingViewingKeyMap mapSaplingIncomingViewingKeys
 
- Public Attributes inherited from CKeyStore
RecursiveMutex cs_KeyStore
 

Static Public Attributes

static const CAmount DEFAULT_STAKE_SPLIT_THRESHOLD = 500 * COIN
 
static CAmount minStakeSplitThreshold = DEFAULT_MIN_STAKE_SPLIT_THRESHOLD
 minimum accpeted value for stake split threshold More...
 
static CFeeRate minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE)
 Fees smaller than this (in upiv) are considered zero fee (for transaction creation) We are ~100 times smaller then bitcoin now (2015-06-23), set minTxFee 10 times higher so it's still 10 times lower comparing to bitcoin. More...
 

Private Types

typedef TxSpendMap< COutPointTxSpends
 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

uint256 m_last_block_processed GUARDED_BY (cs_wallet)
 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...
 
int m_last_block_processed_height GUARDED_BY (cs_wallet)
 
int64_t m_last_block_processed_time GUARDED_BY (cs_wallet)=0
 
void AddToSpends (const COutPoint &outpoint, const uint256 &wtxid)
 
void AddToSpends (const uint256 &wtxid)
 
void MarkConflicted (const uint256 &hashBlock, int conflicting_height, const uint256 &hashTx)
 
template<class T >
void SyncMetaData (std::pair< typename TxSpendMap< T >::iterator, typename TxSpendMap< T >::iterator > range)
 
void ChainTipAdded (const CBlockIndex *pindex, const CBlock *pblock, SaplingMerkleTree saplingTree)
 
void SyncTransaction (const CTransactionRef &tx, const CWalletTx::Confirmation &confirm)
 
bool IsKeyUsed (const CPubKey &vchPubKey) const
 
OutputAvailabilityResult CheckOutputAvailability (const CTxOut &output, const unsigned int outIndex, const uint256 &wtxid, const CCoinControl *coinControl, const bool fCoinsSelected, const bool fIncludeColdStaking, const bool fIncludeDelegated, const bool fIncludeLocked) const
 
std::vector< COutputGetOutputsFromCoinControl (const CCoinControl *coinControl)
 Return the selected known outputs. More...
 

Private Attributes

std::atomic< bool > fAbortRescan
 
std::atomic< bool > fScanningWallet
 
std::mutex mutexScanning
 
bool fDecryptionThoroughlyChecked {false}
 keeps track of whether Unlock has run a thorough check before More...
 
std::unique_ptr< ScriptPubKeyManm_spk_man = std::make_unique<ScriptPubKeyMan>(this)
 Key manager //. More...
 
std::unique_ptr< SaplingScriptPubKeyManm_sspk_man = std::make_unique<SaplingScriptPubKeyMan>(this)
 
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...
 
std::string m_name
 Wallet filename from wallet=<path> command line or config option. More...
 
std::unique_ptr< WalletDatabasedatabase
 Internal database handle. More...
 
int64_t nNextResend
 
int64_t nLastResend
 
std::atomic< int64_t > nTimeBestReceived {0}
 
TxSpends mapTxSpends
 
std::map< CWDestination, AddressBook::CAddressBookDatamapAddressBook
 Destination --> label/purpose mapping. More...
 

Static Private Attributes

static std::atomic< bool > fFlushScheduled
 

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 UnlockSaplingKeys (const CKeyingMaterial &vMasterKeyIn, bool fDecryptionThoroughlyChecked)
 
- Protected Member Functions inherited from CValidationInterface
virtual void BlockChecked (const CBlock &, const CValidationState &)
 
friend void ::RegisterSharedValidationInterface (std::shared_ptr< CValidationInterface >)
 
friend void ::UnregisterValidationInterface (CValidationInterface *)
 
friend void ::UnregisterAllValidationInterfaces ()
 
virtual void NotifyMasternodeListChanged (bool undo, const CDeterministicMNList &oldMNList, const CDeterministicMNListDiff &diff)
 Notifies listeners of updated deterministic masternode list. More...
 
- Static Protected Member Functions inherited from CCryptoKeyStore
static bool DecryptKey (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCryptedSecret, const CPubKey &vchPubKey, CKey &key)
 
- Protected Attributes inherited from CCryptoKeyStore
CKeyingMaterial vMasterKey
 
CryptedSaplingSpendingKeyMap mapCryptedSaplingSpendingKeys
 
CryptedKeyMap mapCryptedKeys
 
- Protected Attributes inherited from CBasicKeyStore
KeyMap mapKeys
 
WatchKeyMap mapWatchKeys
 
ScriptMap mapScripts
 
WatchOnlySet setWatchOnly
 

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.

Definition at line 576 of file wallet.h.

Member Typedef Documentation

◆ MasterKeyMap

typedef std::map<unsigned int, CMasterKey> CWallet::MasterKeyMap

Definition at line 728 of file wallet.h.

◆ TxItems

typedef std::multimap<int64_t, CWalletTx*> CWallet::TxItems

Definition at line 768 of file wallet.h.

◆ TxSpends

Used to keep track of spent outpoints, and detect and report conflicts (double-spends or mutated transactions where the mutant gets mined).

Definition at line 638 of file wallet.h.

Member Enumeration Documentation

◆ CommitStatus

Enumerator
OK 
Abandoned 
NotAccepted 

Definition at line 1097 of file wallet.h.

Constructor & Destructor Documentation

◆ CWallet()

CWallet::CWallet ( std::string  name,
std::unique_ptr< WalletDatabase dbw_in 
)

Construct wallet with specified name and database implementation.

Definition at line 4535 of file wallet.cpp.

Here is the call graph for this function:

◆ ~CWallet()

CWallet::~CWallet ( )

Definition at line 4540 of file wallet.cpp.

Member Function Documentation

◆ AbortRescan()

void CWallet::AbortRescan ( )
inline

Definition at line 885 of file wallet.h.

Here is the caller graph for this function:

◆ AddCryptedSaplingSpendingKeyW()

bool CWallet::AddCryptedSaplingSpendingKeyW ( const libzcash::SaplingExtendedFullViewingKey extfvk,
const std::vector< unsigned char > &  vchCryptedSecret 
)

Definition at line 4734 of file wallet.cpp.

◆ 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 4076 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddSaplingIncomingViewingKeyW()

bool CWallet::AddSaplingIncomingViewingKeyW ( const libzcash::SaplingIncomingViewingKey ivk,
const libzcash::SaplingPaymentAddress addr 
)

Definition at line 4730 of file wallet.cpp.

Here is the caller graph for this function:

◆ AddSaplingZKey()

bool CWallet::AddSaplingZKey ( const libzcash::SaplingExtendedSpendingKey key)

Adds Sapling spending key to the store, and saves it to disk.

Definition at line 4728 of file wallet.cpp.

Here is the caller graph for this function:

◆ AutoCombineDust()

void CWallet::AutoCombineDust ( CConnman connman)

Definition at line 4112 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BackupWallet()

bool CWallet::BackupWallet ( const std::string &  strDest)

Creates a wallet backup in strDest path.

Definition at line 4457 of file wallet.cpp.

Here is the caller graph for this function:

◆ CanSupportFeature()

bool CWallet::CanSupportFeature ( enum WalletFeature  wf)

check whether we are allowed to upgrade (or already support) to the named feature

Definition at line 4584 of file wallet.cpp.

Here is the caller graph for this function:

◆ ClearNoteWitnessCache()

void CWallet::ClearNoteWitnessCache ( )

clear note witness cache

Definition at line 4726 of file wallet.cpp.

◆ CreateWalletFromFile()

CWallet * CWallet::CreateWalletFromFile ( const std::string &  name,
const fs::path &  path 
)
static

Definition at line 4251 of file wallet.cpp.

Here is the call graph for this function:

◆ DecrementNoteWitnesses()

void CWallet::DecrementNoteWitnesses ( const CBlockIndex pindex)

pindex is the old tip being disconnected.

Definition at line 4724 of file wallet.cpp.

Here is the caller graph for this function:

◆ 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 4085 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateNewSaplingZKey()

libzcash::SaplingPaymentAddress CWallet::GenerateNewSaplingZKey ( std::string  label = "")

Generates new Sapling key.

Definition at line 4710 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAddressBookSize()

int CWallet::GetAddressBookSize ( ) const
inline

Definition at line 1176 of file wallet.h.

◆ GetChange() [1/2]

CAmount CWallet::GetChange ( const CTransactionRef tx) const

Definition at line 4680 of file wallet.cpp.

Here is the call graph for this function:

◆ GetChange() [2/2]

CAmount CWallet::GetChange ( const CTxOut txout) const

Definition at line 4610 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCredit() [1/2]

CAmount CWallet::GetCredit ( const CTxOut txout,
const isminefilter filter 
) const

Definition at line 4603 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetCredit() [2/2]

CAmount CWallet::GetCredit ( const CWalletTx tx,
const isminefilter filter 
) const

Definition at line 4661 of file wallet.cpp.

◆ GetDBHandle()

WalletDatabase& CWallet::GetDBHandle ( ) const
inline

Definition at line 752 of file wallet.h.

Here is the caller graph for this function:

◆ GetDBHandlePtr()

WalletDatabase* CWallet::GetDBHandlePtr ( ) const
inline

Get database handle used by this wallet.

Ideally this function would not be necessary.

Definition at line 751 of file wallet.h.

◆ GetDebit()

CAmount CWallet::GetDebit ( const CTransactionRef tx,
const isminefilter filter 
) const

Definition at line 4642 of file wallet.cpp.

◆ GetDestValues()

std::vector< std::string > CWallet::GetDestValues ( const std::string &  prefix) const

Get all destination values matching a prefix.

Definition at line 4098 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetKeyBirthTimes()

void CWallet::GetKeyBirthTimes ( std::map< CKeyID, int64_t > &  mapKeyBirth) const

Definition at line 4026 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetKeyPoolSize()

unsigned int CWallet::GetKeyPoolSize ( )

Definition at line 4691 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetLastBlockHeight()

int CWallet::GetLastBlockHeight ( ) const
inline

Get last block processed height.

Definition at line 689 of file wallet.h.

Here is the caller graph for this function:

◆ GetName()

const std::string& CWallet::GetName ( ) const
inline

Get a name for this wallet for logging/debugging purposes.

Definition at line 756 of file wallet.h.

Here is the caller graph for this function:

◆ GetPathToDBFile()

fs::path CWallet::GetPathToDBFile ( )
inline

Get the path to the wallet's db file.

Definition at line 759 of file wallet.h.

Here is the caller graph for this function:

◆ GetSaplingScriptPubKeyMan()

SaplingScriptPubKeyMan* CWallet::GetSaplingScriptPubKeyMan ( ) const
inline

Definition at line 712 of file wallet.h.

Here is the caller graph for this function:

◆ GetStakeSplitThreshold()

CAmount CWallet::GetStakeSplitThreshold ( ) const
inline

Definition at line 893 of file wallet.h.

Here is the caller graph for this function:

◆ GetStakingKeyPoolSize()

unsigned int CWallet::GetStakingKeyPoolSize ( )

Definition at line 4696 of file wallet.cpp.

Here is the caller graph for this function:

◆ GetUniqueWalletBackupName()

std::string CWallet::GetUniqueWalletBackupName ( ) const

Definition at line 4529 of file wallet.cpp.

Here is the call graph for this function:

◆ GetVersion()

int CWallet::GetVersion ( )

get the current wallet format (the oldest client version guaranteed to understand this wallet)

Definition at line 4701 of file wallet.cpp.

Here is the caller graph for this function:

◆ GUARDED_BY() [1/3]

uint256 m_last_block_processed CWallet::GUARDED_BY ( cs_wallet  )
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)

◆ GUARDED_BY() [2/3]

int m_last_block_processed_height CWallet::GUARDED_BY ( cs_wallet  )
private

◆ GUARDED_BY() [3/3]

int64_t m_last_block_processed_time CWallet::GUARDED_BY ( cs_wallet  )
privatepure virtual

◆ HaveSpendingKeyForPaymentAddress()

bool CWallet::HaveSpendingKeyForPaymentAddress ( const libzcash::SaplingPaymentAddress zaddr) const

Returns true if the wallet contains the spending key.

Definition at line 4738 of file wallet.cpp.

Here is the caller graph for this function:

◆ IncrementNoteWitnesses()

void CWallet::IncrementNoteWitnesses ( const CBlockIndex pindex,
const CBlock pblock,
SaplingMerkleTree saplingTree 
)

pindex is the new tip being connected.

Definition at line 4720 of file wallet.cpp.

Here is the caller graph for this function:

◆ IsAbortingRescan()

bool CWallet::IsAbortingRescan ( )
inline

Definition at line 886 of file wallet.h.

Here is the caller graph for this function:

◆ IsFromMe()

bool CWallet::IsFromMe ( const CTransactionRef tx) const

should probably be renamed to IsRelevantToMe

Definition at line 4625 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsMine() [1/2]

bool CWallet::IsMine ( const CTransactionRef tx) const

Definition at line 4617 of file wallet.cpp.

Here is the call graph for this function:

◆ IsMine() [2/2]

isminetype CWallet::IsMine ( const CTxOut txout) const

Definition at line 4598 of file wallet.cpp.

Here is the call graph for this function:

◆ IsScanning()

bool CWallet::IsScanning ( )
inline

Definition at line 887 of file wallet.h.

Here is the caller graph for this function:

◆ LoadCryptedSaplingZKey()

bool CWallet::LoadCryptedSaplingZKey ( const libzcash::SaplingExtendedFullViewingKey extfvk,
const std::vector< unsigned char > &  vchCryptedSecret 
)

Adds an encrypted spending key to the store, without saving it to disk (used by LoadWallet)

Definition at line 4741 of file wallet.cpp.

◆ 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 4092 of file wallet.cpp.

◆ LoadKey()

bool CWallet::LoadKey ( const CKey key,
const CPubKey pubkey 
)
inline

Adds a key to the store, without saving it to disk (used by LoadWallet)

Definition at line 978 of file wallet.h.

Here is the call graph for this function:

◆ LoadMinVersion()

bool CWallet::LoadMinVersion ( int  nVersion)

Definition at line 4590 of file wallet.cpp.

◆ LoadSaplingPaymentAddress()

bool CWallet::LoadSaplingPaymentAddress ( const libzcash::SaplingPaymentAddress addr,
const libzcash::SaplingIncomingViewingKey ivk 
)

Adds a Sapling payment address -> incoming viewing key map entry, without saving it to disk (used by LoadWallet)

Definition at line 4744 of file wallet.cpp.

Here is the caller graph for this function:

◆ LoadSaplingZKey()

bool CWallet::LoadSaplingZKey ( const libzcash::SaplingExtendedSpendingKey key)

Adds spending key to the store, without saving it to disk (used by LoadWallet)

Definition at line 4739 of file wallet.cpp.

Here is the caller graph for this function:

◆ LoadSaplingZKeyMetadata()

bool CWallet::LoadSaplingZKeyMetadata ( const libzcash::SaplingIncomingViewingKey ivk,
const CKeyMetadata meta 
)

Load spending key metadata (used by LoadWallet)

Definition at line 4740 of file wallet.cpp.

Here is the caller graph for this function:

◆ LockIfMyCollateral()

void CWallet::LockIfMyCollateral ( const CTransactionRef ptx)

Definition at line 4241 of file wallet.cpp.

Here is the call graph for this function:

◆ LockOutpointIfMine()

void CWallet::LockOutpointIfMine ( const CTransactionRef ptx,
const COutPoint c 
)

Definition at line 4221 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LockOutpointIfMineWithMutex()

void CWallet::LockOutpointIfMineWithMutex ( const CTransactionRef ptx,
const COutPoint c 
)

Definition at line 4216 of file wallet.cpp.

Here is the call graph for this function:

◆ NewAddressBookIterator()

CAddressBookIterator CWallet::NewAddressBookIterator ( )
inline

Definition at line 1178 of file wallet.h.

Here is the caller graph for this function:

◆ postInitProcess()

void CWallet::postInitProcess ( CScheduler scheduler)

Wallet post-init setup Gives the wallet a chance to register repetitive tasks and complete post-init tasks.

Definition at line 4446 of file wallet.cpp.

Here is the call graph for this function:

◆ SetLastBlockProcessed()

void CWallet::SetLastBlockProcessed ( const CBlockIndex pindex)
inline

Set last block processed height, currently only use in unit test.

Definition at line 698 of file wallet.h.

Here is the caller graph for this function:

◆ SetNull()

void CWallet::SetNull ( )

Definition at line 4546 of file wallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ WalletRescanReserver

friend class WalletRescanReserver
friend

Definition at line 583 of file wallet.h.

Member Data Documentation

◆ cs_wallet

RecursiveMutex CWallet::cs_wallet
mutable

Definition at line 720 of file wallet.h.

◆ database

std::unique_ptr<WalletDatabase> CWallet::database
private

Internal database handle.

Definition at line 607 of file wallet.h.

◆ DEFAULT_STAKE_SPLIT_THRESHOLD

const CAmount CWallet::DEFAULT_STAKE_SPLIT_THRESHOLD = 500 * COIN
static

Definition at line 679 of file wallet.h.

◆ encrypted_batch

WalletBatch* CWallet::encrypted_batch

Definition at line 724 of file wallet.h.

◆ fAbortRescan

std::atomic<bool> CWallet::fAbortRescan
private

Definition at line 580 of file wallet.h.

◆ fCombineDust

bool CWallet::fCombineDust

Definition at line 744 of file wallet.h.

◆ fDecryptionThoroughlyChecked

bool CWallet::fDecryptionThoroughlyChecked {false}
private

keeps track of whether Unlock has run a thorough check before

Definition at line 587 of file wallet.h.

◆ fFlushScheduled

std::atomic< bool > CWallet::fFlushScheduled
staticprivate

Definition at line 579 of file wallet.h.

◆ frequency

int CWallet::frequency

Definition at line 746 of file wallet.h.

◆ fScanningWallet

std::atomic<bool> CWallet::fScanningWallet
private

Definition at line 581 of file wallet.h.

◆ fUseCustomFee

bool CWallet::fUseCustomFee

Definition at line 740 of file wallet.h.

◆ fWalletUnlockStaking

bool CWallet::fWalletUnlockStaking

Definition at line 722 of file wallet.h.

◆ m_name

std::string CWallet::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 604 of file wallet.h.

◆ m_spk_man

std::unique_ptr<ScriptPubKeyMan> CWallet::m_spk_man = std::make_unique<ScriptPubKeyMan>(this)
private

Key manager //.

Definition at line 590 of file wallet.h.

◆ m_sspk_man

std::unique_ptr<SaplingScriptPubKeyMan> CWallet::m_sspk_man = std::make_unique<SaplingScriptPubKeyMan>(this)
private

Definition at line 591 of file wallet.h.

◆ mapAddressBook

std::map<CWDestination, AddressBook::CAddressBookData> CWallet::mapAddressBook
private

Destination --> label/purpose mapping.

Definition at line 675 of file wallet.h.

◆ mapKeyMetadata

std::map<CKeyID, CKeyMetadata> CWallet::mapKeyMetadata

Definition at line 726 of file wallet.h.

◆ mapMasterKeys

MasterKeyMap CWallet::mapMasterKeys

Definition at line 729 of file wallet.h.

◆ mapTxSpends

TxSpends CWallet::mapTxSpends
private

Definition at line 639 of file wallet.h.

◆ mapWallet

std::map<uint256, CWalletTx> CWallet::mapWallet

Definition at line 766 of file wallet.h.

◆ minStakeSplitThreshold

CAmount CWallet::minStakeSplitThreshold = DEFAULT_MIN_STAKE_SPLIT_THRESHOLD
static

minimum accpeted value for stake split threshold

Definition at line 735 of file wallet.h.

◆ minTxFee

CFeeRate CWallet::minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE)
static

Fees smaller than this (in upiv) are considered zero fee (for transaction creation) We are ~100 times smaller then bitcoin now (2015-06-23), set minTxFee 10 times higher so it's still 10 times lower comparing to bitcoin.

Override with -mintxfee

Definition at line 1129 of file wallet.h.

◆ mutexScanning

std::mutex CWallet::mutexScanning
private

Definition at line 582 of file wallet.h.

◆ nAutoCombineThreshold

CAmount CWallet::nAutoCombineThreshold

Definition at line 745 of file wallet.h.

◆ nCustomFee

CAmount CWallet::nCustomFee

Definition at line 741 of file wallet.h.

◆ nLastResend

int64_t CWallet::nLastResend
private

Definition at line 630 of file wallet.h.

◆ nMasterKeyMaxID

unsigned int CWallet::nMasterKeyMaxID

Definition at line 730 of file wallet.h.

◆ nNextResend

int64_t CWallet::nNextResend
private

Definition at line 629 of file wallet.h.

◆ nOrderPosNext

int64_t CWallet::nOrderPosNext

Definition at line 771 of file wallet.h.

◆ NotifyAddressBookChanged

boost::signals2::signal<void(CWallet* wallet, const CWDestination& 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 1233 of file wallet.h.

◆ NotifySSTChanged

boost::signals2::signal<void (const CAmount stakeSplitThreshold)> CWallet::NotifySSTChanged

notify stake-split threshold changed

Definition at line 1251 of file wallet.h.

◆ 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 1239 of file wallet.h.

◆ NotifyWalletBacked

boost::signals2::signal<void (const bool fSuccess, const std::string& filename)> CWallet::NotifyWalletBacked

notify wallet file backed up

Definition at line 1248 of file wallet.h.

◆ NotifyWatchonlyChanged

boost::signals2::signal<void(bool fHaveWatchOnly)> CWallet::NotifyWatchonlyChanged

Watch-only address added.

Definition at line 1245 of file wallet.h.

◆ nRelockTime

int64_t CWallet::nRelockTime

Lock Wallet 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 1009 of file wallet.h.

◆ nStakeSplitThreshold

CAmount CWallet::nStakeSplitThreshold

Definition at line 733 of file wallet.h.

◆ nTimeBestReceived

std::atomic<int64_t> CWallet::nTimeBestReceived {0}
private

Definition at line 631 of file wallet.h.

◆ nTimeFirstKey

int64_t CWallet::nTimeFirstKey

Definition at line 776 of file wallet.h.

◆ nWalletMaxVersion

int CWallet::nWalletMaxVersion
private

the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded

Definition at line 597 of file wallet.h.

◆ nWalletVersion

int CWallet::nWalletVersion
private

the current wallet version: clients below this version are not able to load the wallet

Definition at line 594 of file wallet.h.

◆ pStakerStatus

CStakerStatus* CWallet::pStakerStatus = nullptr

Definition at line 737 of file wallet.h.

◆ setLockedCoins

std::set<COutPoint> CWallet::setLockedCoins

Definition at line 773 of file wallet.h.

◆ setLockedNotes

std::set<SaplingOutPoint> CWallet::setLockedNotes

Definition at line 774 of file wallet.h.

◆ ShowProgress

boost::signals2::signal<void(const std::string& title, int nProgress)> CWallet::ShowProgress

Show progress e.g.

for rescan

Definition at line 1242 of file wallet.h.

◆ wtxOrdered

TxItems CWallet::wtxOrdered

Definition at line 769 of file wallet.h.


The documentation for this class was generated from the following files: