Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Classes | |
struct | CompareValueOnly |
class | CAffectedKeysVisitor |
Functions | |
std::string | COutput::ToString () const |
int | COutput::Priority () const |
const CWalletTx * | CWallet::GetWalletTx (const uint256 &hash) const |
CPubKey | CWallet::GenerateNewKey (WalletBatch &batch, uint32_t nAccountIndex, bool fInternal) |
keystore implementation Generate a new key More... | |
void | CWallet::DeriveNewChildKey (WalletBatch &batch, const CKeyMetadata &metadata, CKey &secretRet, uint32_t nAccountIndex, bool fInternal) |
bool | CWallet::GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override |
GetPubKey implementation that also checks the mapHdPubKeys. More... | |
bool | CWallet::GetKey (const CKeyID &address, CKey &keyOut) const override |
GetKey implementation that can derive a HD private key on the fly. More... | |
bool | CWallet::HaveKey (const CKeyID &address) const override |
HaveKey implementation that also checks the mapHdPubKeys. More... | |
bool | CWallet::LoadHDPubKey (const CHDPubKey &hdPubKey) |
loads a HDPubKey into the wallets memory More... | |
bool | CWallet::AddHDPubKey (WalletBatch &batch, const CExtPubKey &extPubKey, bool fInternal) |
Adds a HDPubKey into the wallet(database) More... | |
bool | CWallet::AddKeyPubKeyWithDB (WalletBatch &batch, const CKey &key, const CPubKey &pubkey) |
bool | CWallet::AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override |
Adds a key to the store, and saves it to disk. More... | |
bool | CWallet::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 | CWallet::LoadKeyMetadata (const CKeyID &keyID, const CKeyMetadata &metadata) |
Load metadata (used by LoadWallet) More... | |
bool | CWallet::LoadScriptMetadata (const CScriptID &script_id, const CKeyMetadata &metadata) |
bool | CWallet::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... | |
void | CWallet::UpdateTimeFirstKey (int64_t nCreateTime) |
Update wallet first key creation time. More... | |
bool | CWallet::AddCScript (const CScript &redeemScript) override |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More... | |
bool | CWallet::LoadCScript (const CScript &redeemScript) |
bool | CWallet::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... | |
bool | CWallet::AddWatchOnly (const CScript &dest, int64_t nCreateTime) |
Adds a watch-only address to the store, and saves it to disk. More... | |
bool | CWallet::RemoveWatchOnly (const CScript &dest) override |
bool | CWallet::LoadWatchOnly (const CScript &dest) |
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) More... | |
bool | CWallet::Unlock (const SecureString &strWalletPassphrase, bool fForMixingOnly=false) |
bool | CWallet::ChangeWalletPassphrase (const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase) |
void | CWallet::SetBestChain (const CBlockLocator &loc) override |
Notifies listeners of the new active block chain on-disk. More... | |
bool | CWallet::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 | CWallet::SetMaxVersion (int nVersion) |
change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format) More... | |
std::set< uint256 > | CWallet::GetConflicts (const uint256 &txid) const |
Get wallet transactions that conflict with given transaction (spend same outputs) More... | |
void | CWallet::Flush (bool shutdown=false) |
Flush wallet (bitdb flush) More... | |
void | CWallet::SyncMetaData (std::pair< TxSpends::iterator, TxSpends::iterator >) |
bool | CWallet::IsSpent (const uint256 &hash, unsigned int n) const |
Outpoint is spent if any non-conflicted transaction spends it: More... | |
void | CWallet::AddToSpends (const COutPoint &outpoint, const uint256 &wtxid) |
void | CWallet::AddToSpends (const uint256 &wtxid) |
bool | CWallet::EncryptWallet (const SecureString &strWalletPassphrase) |
DBErrors | CWallet::ReorderTransactions () |
int64_t | CWallet::IncOrderPosNext (WalletBatch *batch=nullptr) |
Increment the next transaction order id. More... | |
bool | CWallet::AccountMove (std::string strFrom, std::string strTo, CAmount nAmount, std::string strComment="") |
bool | CWallet::GetAccountDestination (CTxDestination &dest, std::string strAccount, bool bForceNew=false) |
void | CWallet::MarkDirty () |
bool | CWallet::AddToWallet (const CWalletTx &wtxIn, bool fFlushOnClose=true) |
bool | CWallet::LoadToWallet (const CWalletTx &wtxIn) |
bool | CWallet::AddToWalletIfInvolvingMe (const CTransactionRef &tx, const CBlockIndex *pIndex, int posInBlock, bool fUpdate) |
Add a transaction to the wallet, or update it. More... | |
bool | CWallet::TransactionCanBeAbandoned (const uint256 &hashTx) const |
Return whether transaction can be abandoned. More... | |
bool | CWallet::AbandonTransaction (const uint256 &hashTx) |
void | CWallet::MarkConflicted (const uint256 &hashBlock, const uint256 &hashTx) |
void | CWallet::SyncTransaction (const CTransactionRef &tx, const CBlockIndex *pindex=nullptr, int posInBlock=0) |
void | CWallet::TransactionAddedToMempool (const CTransactionRef &tx, int64_t nAcceptTime) override |
Notifies listeners of a transaction having been added to mempool. More... | |
void | CWallet::TransactionRemovedFromMempool (const CTransactionRef &ptx) override |
Notifies listeners of a transaction leaving mempool. More... | |
void | CWallet::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 | CWallet::BlockDisconnected (const std::shared_ptr< const CBlock > &pblock, const CBlockIndex *pindexDisconnected) override |
Notifies listeners of a block being disconnected. More... | |
void | CWallet::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... | |
isminetype | CWallet::IsMine (const CTxIn &txin) const |
CAmount | CWallet::GetDebit (const CTxIn &txin, const isminefilter &filter) const |
Returns amount of debit if the input matches the filter, otherwise returns 0. More... | |
int | CWallet::GetRealOutpointPrivateSendRounds (const COutPoint &outpoint, int nRounds=0) const |
int | CWallet::GetCappedOutpointPrivateSendRounds (const COutPoint &outpoint) const |
bool | CWallet::IsDenominated (const COutPoint &outpoint) const |
bool | CWallet::IsFullyMixed (const COutPoint &outpoint) const |
isminetype | CWallet::IsMine (const CTxOut &txout) const |
CAmount | CWallet::GetCredit (const CTxOut &txout, const isminefilter &filter) const |
bool | CWallet::IsChange (const CTxOut &txout) const |
CAmount | CWallet::GetChange (const CTxOut &txout) const |
void | CWallet::GenerateNewHDChain () |
bool | CWallet::SetHDChain (WalletBatch &batch, const CHDChain &chain, bool memonly) |
bool | CWallet::SetCryptedHDChain (WalletBatch &batch, const CHDChain &chain, bool memonly) |
bool | CWallet::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 | CWallet::SetCryptedHDChainSingle (const CHDChain &chain, bool memonly) |
bool | CWallet::GetDecryptedHDChain (CHDChain &hdChainRet) |
bool | CWallet::IsHDEnabled () const |
HD Wallet Functions. More... | |
bool | CWallet::IsMine (const CTransaction &tx) const |
bool | CWallet::IsFromMe (const CTransaction &tx) const |
should probably be renamed to IsRelevantToMe More... | |
CAmount | CWallet::GetDebit (const CTransaction &tx, const isminefilter &filter) const |
bool | CWallet::IsAllFromMe (const CTransaction &tx, const isminefilter &filter) const |
Returns whether all of the inputs match the filter. More... | |
CAmount | CWallet::GetCredit (const CTransaction &tx, const isminefilter &filter) const |
CAmount | CWallet::GetChange (const CTransaction &tx) const |
int64_t | CWalletTx::GetTxTime () const |
void | CWalletTx::GetAmounts (std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const |
int64_t | CWallet::RescanFromTime (int64_t startTime, const WalletRescanReserver &reserver, bool update) |
Scan active chain for relevant transactions after importing keys. More... | |
CBlockIndex * | CWallet::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 | CWallet::ReacceptWalletTransactions () |
bool | CWalletTx::RelayWalletTransaction (CConnman *connman) |
std::set< uint256 > | CWalletTx::GetConflicts () const |
CAmount | CWalletTx::GetDebit (const isminefilter &filter) const |
filter decides which addresses will count towards the debit More... | |
CAmount | CWalletTx::GetCredit (const isminefilter &filter) const |
CAmount | CWalletTx::GetImmatureCredit (bool fUseCache=true) const |
CAmount | CWalletTx::GetAvailableCredit (bool fUseCache=true) const |
CAmount | CWalletTx::GetImmatureWatchOnlyCredit (const bool fUseCache=true) const |
CAmount | CWalletTx::GetAvailableWatchOnlyCredit (const bool fUseCache=true) const |
CAmount | CWalletTx::GetAnonymizedCredit (const CCoinControl *coinControl=nullptr) const |
CAmount | CWalletTx::GetDenominatedCredit (bool unconfirmed, bool fUseCache=true) const |
CAmount | CWalletTx::GetChange () const |
bool | CWalletTx::InMempool () const |
bool | CWalletTx::IsTrusted () const |
bool | CWalletTx::IsEquivalentTo (const CWalletTx &tx) const |
std::vector< uint256 > | CWallet::ResendWalletTransactionsBefore (int64_t nTime, CConnman *connman) |
void | CWallet::ResendWalletTransactions (int64_t nBestBlockTime, CConnman *connman) override |
Tells listeners to broadcast their data. More... | |
Detailed Description
Function Documentation
◆ AbandonTransaction()
bool CWallet::AbandonTransaction | ( | const uint256 & | hashTx | ) |
Definition at line 1283 of file wallet.cpp.
References base_blob< BITS >::begin(), cs_main, CWallet::cs_wallet, CT_UPDATED, CWallet::database, done, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, CMerkleTx::GetDepthInMainChain(), COutPoint::hash, LOCK2, CWallet::mapTxSpends, CWallet::mapWallet, CWallet::NotifyTransactionChanged, CTxIn::prevout, and WalletBatch::WriteTx().
Referenced by WalletModel::abandonTransaction(), and abandontransaction().
◆ AccountMove()
bool CWallet::AccountMove | ( | std::string | strFrom, |
std::string | strTo, | ||
CAmount | nAmount, | ||
std::string | strComment = "" |
||
) |
Definition at line 1009 of file wallet.cpp.
References CWallet::AddAccountingEntry(), CWallet::database, GetAdjustedTime(), CWallet::IncOrderPosNext(), CAccountingEntry::nCreditDebit, CAccountingEntry::nOrderPos, CAccountingEntry::nTime, CAccountingEntry::strAccount, CAccountingEntry::strComment, CAccountingEntry::strOtherAccount, WalletBatch::TxnBegin(), and WalletBatch::TxnCommit().
Referenced by movecmd().
◆ AddCryptedKey()
|
overridevirtual |
Adds an encrypted key to the store, and saves it to disk.
Reimplemented from CCryptoKeyStore.
Definition at line 412 of file wallet.cpp.
References CCryptoKeyStore::AddCryptedKey(), CWallet::cs_wallet, CWallet::encrypted_batch, CPubKey::GetID(), LOCK, CWallet::mapKeyMetadata, and WalletBatch::WriteCryptedKey().
◆ AddCScript()
|
overridevirtual |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
Reimplemented from CBasicKeyStore.
Definition at line 467 of file wallet.cpp.
References CBasicKeyStore::AddCScript(), Hash160(), and WalletBatch::WriteCScript().
Referenced by addmultisigaddress(), ImportScript(), importwallet(), and ProcessImport().
◆ AddHDPubKey()
bool CWallet::AddHDPubKey | ( | WalletBatch & | batch, |
const CExtPubKey & | extPubKey, | ||
bool | fInternal | ||
) |
Adds a HDPubKey into the wallet(database)
Definition at line 344 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CHDPubKey::extPubKey, CCryptoKeyStore::GetHDChain(), CHDChain::GetID(), CPubKey::GetID(), GetScriptForDestination(), GetScriptForRawPubKey(), CBasicKeyStore::HaveWatchOnly(), CHDPubKey::hdchainID, CWallet::mapHdPubKeys, CWallet::mapKeyMetadata, CHDPubKey::nChangeIndex, CExtPubKey::pubkey, CWallet::RemoveWatchOnly(), and WalletBatch::WriteHDPubKey().
Referenced by CWallet::DeriveNewChildKey().
◆ AddKeyPubKey()
Adds a key to the store, and saves it to disk.
Reimplemented from CCryptoKeyStore.
Definition at line 405 of file wallet.cpp.
References CWallet::AddKeyPubKeyWithDB(), and CWallet::database.
Referenced by AddKey(), BOOST_FIXTURE_TEST_CASE(), importelectrumwallet(), importprivkey(), importwallet(), and ProcessImport().
◆ AddKeyPubKeyWithDB()
bool CWallet::AddKeyPubKeyWithDB | ( | WalletBatch & | batch, |
const CKey & | key, | ||
const CPubKey & | pubkey | ||
) |
Definition at line 369 of file wallet.cpp.
References CCryptoKeyStore::AddKeyPubKey(), AssertLockHeld(), CWallet::cs_wallet, CWallet::encrypted_batch, CPubKey::GetID(), CKey::GetPrivKey(), GetScriptForDestination(), GetScriptForRawPubKey(), CBasicKeyStore::HaveWatchOnly(), CCryptoKeyStore::IsCrypted(), CWallet::mapKeyMetadata, CWallet::RemoveWatchOnly(), and WalletBatch::WriteKey().
Referenced by CWallet::AddKeyPubKey(), and CWallet::GenerateNewKey().
◆ AddToSpends() [1/2]
Definition at line 774 of file wallet.cpp.
References CWallet::mapTxSpends, CWallet::setWalletUTXO, and CWallet::SyncMetaData().
Referenced by CWallet::AddToSpends(), CWallet::AddToWallet(), and CWallet::LoadToWallet().
◆ AddToSpends() [2/2]
|
private |
Definition at line 785 of file wallet.cpp.
References CWallet::AddToSpends(), CWallet::mapWallet, and CTxIn::prevout.
◆ AddToWallet()
Definition at line 1094 of file wallet.cpp.
References CWallet::AddToSpends(), CWalletTx::BindWallet(), CWallet::ComputeTimeSmart(), CWallet::cs_wallet, CT_NEW, CT_UPDATED, CWallet::database, deterministicMNManager, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, CWalletTx::fFromMe, gArgs, GetAdjustedTime(), ArgsManager::GetArg(), CMerkleTx::GetHash(), base_blob< BITS >::GetHex(), CMerkleTx::hashBlock, CMerkleTx::hashUnset(), CWallet::IncOrderPosNext(), CMerkleTx::isAbandoned(), CWallet::IsMine(), base_blob< BITS >::IsNull(), CWallet::IsSpent(), LOCK, CWallet::LockCoin(), LogPrintf, CWalletTx::m_it_wtxOrdered, CWallet::mapWallet, CWalletTx::MarkDirty(), CMerkleTx::nIndex, CWalletTx::nOrderPos, CWallet::NotifyTransactionChanged, CWalletTx::nTimeReceived, CWalletTx::nTimeSmart, runCommand(), CWallet::setWalletUTXO, base_blob< BITS >::ToString(), CMerkleTx::tx, WalletBatch::WriteTx(), and CWallet::wtxOrdered.
Referenced by CWallet::AddToWalletIfInvolvingMe(), AddTx(), CWallet::CommitTransaction(), and importprunedfunds().
◆ AddToWalletIfInvolvingMe()
bool CWallet::AddToWalletIfInvolvingMe | ( | const CTransactionRef & | ptx, |
const CBlockIndex * | pIndex, | ||
int | posInBlock, | ||
bool | fUpdate | ||
) |
Add a transaction to the wallet, or update it.
pIndex and posInBlock should be set when the transaction was known to be included in a block. When pIndex == nullptr, then wallet state is not updated in AddToWallet, but notifications happen and cached balances are marked dirty.
If fUpdate is true, existing transactions will be updated. TODO: One exception to this is that the abandoned state is cleared under the assumption that any further notification of a transaction that was considered abandoned is an indication that it is not safe to be considered abandoned. Abandoned state should probably be more carefully tracked via different posInBlock signals or by checking mempool presence when necessary.
Definition at line 1217 of file wallet.cpp.
References CWallet::AddToWallet(), AssertLockHeld(), CWallet::cs_wallet, CBlockIndex::GetBlockHash(), CTransaction::GetHash(), CWallet::IsFromMe(), CWallet::IsMine(), LogPrintf, CWallet::m_pool_key_to_index, CWallet::mapTxSpends, CWallet::mapWallet, CWallet::MarkConflicted(), CWallet::MarkReserveKeysAsUsed(), CTxIn::prevout, CAffectedKeysVisitor::Process(), CTxOut::scriptPubKey, CMerkleTx::SetMerkleBranch(), CWallet::TopUpKeyPool(), base_blob< BITS >::ToString(), CTransaction::vin, and CTransaction::vout.
Referenced by CWallet::ScanForWalletTransactions(), and CWallet::SyncTransaction().
◆ AddWatchOnly() [1/2]
|
overrideprivatevirtual |
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.
Because this is an inherited virtual method, it is accessible despite being marked private, but it is marked private anyway to encourage use of the other AddWatchOnly which accepts a timestamp and sets nTimeFirstKey more intelligently for more efficient rescans.
Reimplemented from CBasicKeyStore.
Definition at line 490 of file wallet.cpp.
References CBasicKeyStore::AddWatchOnly(), CWallet::m_script_metadata, CKeyMetadata::nCreateTime, CWallet::NotifyWatchonlyChanged, CWallet::UpdateTimeFirstKey(), and WalletBatch::WriteWatchOnly().
Referenced by CWallet::AddWatchOnly(), ImportScript(), and ProcessImport().
◆ AddWatchOnly() [2/2]
bool CWallet::AddWatchOnly | ( | const CScript & | dest, |
int64_t | nCreateTime | ||
) |
Adds a watch-only address to the store, and saves it to disk.
Definition at line 500 of file wallet.cpp.
References CWallet::AddWatchOnly(), and CWallet::m_script_metadata.
◆ BlockConnected()
|
overridevirtual |
Notifies listeners of a block being connected.
Provides a vector of transactions evicted from the mempool as a result.
Called on a background thread.
Reimplemented from CValidationInterface.
Definition at line 1449 of file wallet.cpp.
References cs_main, CWallet::cs_wallet, CT_UPDATED, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, CBlockIndex::GetBlockHash(), CWallet::hashPrevBestCoinbase, base_blob< BITS >::IsNull(), LOCK2, CWallet::m_last_block_processed, CWallet::mapWallet, CWallet::NotifyTransactionChanged, CBlockIndex::pprev, CWallet::SyncTransaction(), and CWallet::TransactionRemovedFromMempool().
◆ BlockDisconnected()
|
overridevirtual |
Notifies listeners of a block being disconnected.
Called on a background thread.
Reimplemented from CValidationInterface.
Definition at line 1502 of file wallet.cpp.
References cs_main, CWallet::cs_wallet, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, LOCK2, and CWallet::SyncTransaction().
◆ BlockUntilSyncedToCurrentChain()
void CWallet::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.
Definition at line 1517 of file wallet.cpp.
References AssertLockNotHeld, chainActive, cs_main, CWallet::cs_wallet, CBlockIndex::GetAncestor(), LOCK, CWallet::m_last_block_processed, CBlockIndex::nHeight, SyncWithValidationInterfaceQueue(), and CChain::Tip().
Referenced by abandontransaction(), backupwallet(), fundrawtransaction(), getbalance(), getreceivedbyaccount(), getreceivedbyaddress(), gettransaction(), getunconfirmedbalance(), getwalletinfo(), listaccounts(), listaddressgroupings(), listreceivedbyaccount(), listreceivedbyaddress(), listsinceblock(), listtransactions(), listunspent(), lockunspent(), sendfrom(), sendmany(), and sendtoaddress().
◆ ChangeWalletPassphrase()
bool CWallet::ChangeWalletPassphrase | ( | const SecureString & | strOldWalletPassphrase, |
const SecureString & | strNewWalletPassphrase | ||
) |
Definition at line 567 of file wallet.cpp.
References CWallet::cs_wallet, CCrypter::Decrypt(), CCrypter::Encrypt(), gArgs, ArgsManager::GetBoolArg(), GetTimeMillis(), CCryptoKeyStore::IsLocked(), keePassInt, CCryptoKeyStore::Lock(), LOCK, LogPrintf, CWallet::mapMasterKeys, CKeePassIntegrator::retrievePassphrase(), CCrypter::SetKeyFromPassphrase(), CCryptoKeyStore::Unlock(), CKeePassIntegrator::updatePassphrase(), and WalletBatch::WriteMasterKey().
Referenced by WalletModel::changePassphrase(), and walletpassphrasechange().
◆ DeriveNewChildKey()
|
private |
Definition at line 225 of file wallet.cpp.
References CWallet::AddHDPubKey(), CCryptoKeyStore::DecryptHDChain(), CHDChain::DeriveChildExtKey(), CHDChain::GetAccount(), CCryptoKeyStore::GetHDChain(), CHDChain::GetID(), CPubKey::GetID(), CKey::GetPubKey(), CHDChain::GetSeedHash(), CWallet::HaveKey(), CCryptoKeyStore::IsCrypted(), CExtKey::key, CWallet::mapKeyMetadata, CKeyMetadata::nCreateTime, CExtKey::Neuter(), CHDAccount::nExternalChainCounter, CHDAccount::nInternalChainCounter, CHDChain::SetAccount(), CWallet::SetCryptedHDChain(), CWallet::SetHDChain(), CWallet::UpdateTimeFirstKey(), and CKey::VerifyPubKey().
Referenced by CWallet::GenerateNewKey().
◆ EncryptWallet()
bool CWallet::EncryptWallet | ( | const SecureString & | strWalletPassphrase | ) |
Definition at line 797 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::database, DBG, CCrypter::Encrypt(), CWallet::encrypted_batch, CCryptoKeyStore::EncryptHDChain(), CCryptoKeyStore::EncryptKeys(), FEATURE_WALLETCRYPT, gArgs, ArgsManager::GetBoolArg(), CCryptoKeyStore::GetHDChain(), CHDChain::GetID(), CHDChain::GetSeed(), CHDChain::GetSeedHash(), GetStrongRandBytes(), GetTimeMillis(), HexStr(), CCryptoKeyStore::IsCrypted(), CWallet::IsHDEnabled(), CHDChain::IsNull(), keePassInt, CCryptoKeyStore::Lock(), LOCK, LogPrintf, CWallet::mapMasterKeys, CMasterKey::nDerivationMethod, CMasterKey::nDeriveIterations, CWallet::NewKeyPool(), CWallet::nMasterKeyMaxID, CCryptoKeyStore::NotifyStatusChanged, tinyformat::printf(), CWallet::SetCryptedHDChain(), CCrypter::SetKeyFromPassphrase(), CWallet::SetMinVersion(), CWallet::TopUpKeyPool(), WalletBatch::TxnAbort(), WalletBatch::TxnBegin(), WalletBatch::TxnCommit(), CWallet::Unlock(), CKeePassIntegrator::updatePassphrase(), CMasterKey::vchCryptedKey, CMasterKey::vchSalt, WALLET_CRYPTO_KEY_SIZE, WALLET_CRYPTO_SALT_SIZE, and WalletBatch::WriteMasterKey().
Referenced by encryptwallet(), and WalletModel::setWalletEncrypted().
◆ Flush()
void CWallet::Flush | ( | bool | shutdown = false | ) |
◆ GenerateNewHDChain()
void CWallet::GenerateNewHDChain | ( | ) |
Definition at line 1744 of file wallet.cpp.
References CHDChain::Debug(), ArgsManager::ForceRemoveArg(), gArgs, ArgsManager::GetArg(), ArgsManager::IsArgSet(), IsHex(), LogPrintf, ParseHex(), CWallet::SetHDChainSingle(), CHDChain::SetMnemonic(), and CHDChain::SetSeed().
◆ GenerateNewKey()
CPubKey CWallet::GenerateNewKey | ( | WalletBatch & | batch, |
uint32_t | nAccountIndex, | ||
bool | fInternal | ||
) |
keystore implementation Generate a new key
Definition at line 187 of file wallet.cpp.
References CWallet::AddKeyPubKeyWithDB(), AssertLockHeld(), CWallet::CanSupportFeature(), CWallet::cs_wallet, CWallet::DeriveNewChildKey(), FEATURE_COMPRPUBKEY, CPubKey::GetID(), CKey::GetPubKey(), GetTime(), CWallet::IsHDEnabled(), CKey::MakeNewKey(), CWallet::mapKeyMetadata, CWallet::SetMinVersion(), CWallet::UpdateTimeFirstKey(), and CKey::VerifyPubKey().
Referenced by CTransactionBuilder::CTransactionBuilder(), CWallet::GetKeyFromPool(), and CWallet::TopUpKeyPool().
◆ GetAccountDestination()
bool CWallet::GetAccountDestination | ( | CTxDestination & | dest, |
std::string | strAccount, | ||
bool | bForceNew = false |
||
) |
Definition at line 1043 of file wallet.cpp.
References CWallet::database, CPubKey::GetID(), CWallet::GetKeyFromPool(), GetScriptForDestination(), CPubKey::IsValid(), CWallet::mapWallet, WalletBatch::ReadAccount(), CTxOut::scriptPubKey, CWallet::SetAddressBook(), CAccount::vchPubKey, and WalletBatch::WriteAccount().
Referenced by GetAccountDestination().
◆ GetAmounts()
void CWalletTx::GetAmounts | ( | std::list< COutputEntry > & | listReceived, |
std::list< COutputEntry > & | listSent, | ||
CAmount & | nFee, | ||
std::string & | strSentAccount, | ||
const isminefilter & | filter | ||
) | const |
Definition at line 1929 of file wallet.cpp.
References ExtractDestination(), CWalletTx::GetDebit(), CMerkleTx::GetHash(), CWallet::IsChange(), CWallet::IsMine(), CScript::IsUnspendable(), LogPrintf, CTxOut::nValue, CWalletTx::pwallet, CTxOut::scriptPubKey, CWalletTx::strFromAccount, and CMerkleTx::tx.
Referenced by listaccounts(), and ListTransactions().
◆ GetAnonymizedCredit()
CAmount CWalletTx::GetAnonymizedCredit | ( | const CCoinControl * | coinControl = nullptr | ) | const |
Definition at line 2320 of file wallet.cpp.
References CWalletTx::fAnonymizedCreditCached, CWallet::GetCredit(), CMerkleTx::GetDepthInMainChain(), CMerkleTx::GetHash(), CCoinControl::HasSelected(), CMerkleTx::IsCoinBase(), CPrivateSend::IsDenominatedAmount(), CWallet::IsFullyMixed(), ISMINE_SPENDABLE, CCoinControl::IsSelected(), CWallet::IsSpent(), MoneyRange(), CWalletTx::nAnonymizedCreditCached, CTxOut::nValue, CWalletTx::pwallet, and CMerkleTx::tx.
◆ GetAvailableCredit()
Definition at line 2247 of file wallet.cpp.
References CWalletTx::fAvailableCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::GetHash(), CMerkleTx::IsCoinBase(), ISMINE_SPENDABLE, CWallet::IsSpent(), MoneyRange(), CWalletTx::nAvailableCreditCached, CWalletTx::pwallet, and CMerkleTx::tx.
◆ GetAvailableWatchOnlyCredit()
Definition at line 2291 of file wallet.cpp.
References CWalletTx::fAvailableWatchCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::GetHash(), CMerkleTx::IsCoinBase(), ISMINE_WATCH_ONLY, CWallet::IsSpent(), MoneyRange(), CWalletTx::nAvailableWatchCreditCached, CWalletTx::pwallet, and CMerkleTx::tx.
◆ GetCappedOutpointPrivateSendRounds()
int CWallet::GetCappedOutpointPrivateSendRounds | ( | const COutPoint & | outpoint | ) | const |
Definition at line 1657 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::GetRealOutpointPrivateSendRounds(), LOCK, CPrivateSendClientManager::nPrivateSendRounds, and privateSendClient.
Referenced by CWallet::GetAverageAnonymizedRounds(), and CWallet::GetNormalizedAnonymizedBalance().
◆ GetChange() [1/3]
CAmount CWalletTx::GetChange | ( | ) | const |
Definition at line 2405 of file wallet.cpp.
References CWalletTx::fChangeCached, CWallet::GetChange(), CWalletTx::nChangeCached, CWalletTx::pwallet, and CMerkleTx::tx.
Referenced by TransactionRecord::decomposeTransaction(), and TransactionDesc::toHTML().
◆ GetChange() [2/3]
Definition at line 1737 of file wallet.cpp.
References CWallet::IsChange(), MoneyRange(), and CTxOut::nValue.
Referenced by CWalletTx::GetChange(), and CWallet::GetChange().
◆ GetChange() [3/3]
CAmount CWallet::GetChange | ( | const CTransaction & | tx | ) | const |
Definition at line 1911 of file wallet.cpp.
References CWallet::GetChange(), MoneyRange(), and CTransaction::vout.
◆ GetConflicts() [1/2]
std::set< uint256 > CWalletTx::GetConflicts | ( | ) | const |
Definition at line 2157 of file wallet.cpp.
References CWallet::GetConflicts(), CMerkleTx::GetHash(), and CWalletTx::pwallet.
Referenced by WalletTxToJSON().
◆ GetConflicts() [2/2]
Get wallet transactions that conflict with given transaction (spend same outputs)
Definition at line 685 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CWallet::mapTxSpends, CWallet::mapWallet, CTxIn::prevout, and CMerkleTx::tx.
Referenced by CWalletTx::GetConflicts().
◆ GetCredit() [1/3]
CAmount CWalletTx::GetCredit | ( | const isminefilter & | filter | ) | const |
Definition at line 2200 of file wallet.cpp.
References CWalletTx::fCreditCached, CWalletTx::fWatchCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::IsCoinBase(), ISMINE_SPENDABLE, ISMINE_WATCH_ONLY, CWalletTx::nCreditCached, CWalletTx::nWatchCreditCached, CWalletTx::pwallet, and CMerkleTx::tx.
Referenced by TransactionRecord::decomposeTransaction(), gettransaction(), and TransactionDesc::toHTML().
◆ GetCredit() [2/3]
CAmount CWallet::GetCredit | ( | const CTxOut & | txout, |
const isminefilter & | filter | ||
) | const |
Definition at line 1708 of file wallet.cpp.
References CWallet::IsMine(), MoneyRange(), and CTxOut::nValue.
Referenced by CWalletTx::GetAnonymizedCredit(), CWalletTx::GetAvailableCredit(), CWalletTx::GetAvailableWatchOnlyCredit(), CWalletTx::GetCredit(), CWallet::GetCredit(), CWalletTx::GetDenominatedCredit(), CWalletTx::GetImmatureCredit(), CWalletTx::GetImmatureWatchOnlyCredit(), and TransactionDesc::toHTML().
◆ GetCredit() [3/3]
CAmount CWallet::GetCredit | ( | const CTransaction & | tx, |
const isminefilter & | filter | ||
) | const |
Definition at line 1899 of file wallet.cpp.
References CWallet::GetCredit(), MoneyRange(), and CTransaction::vout.
◆ GetDebit() [1/3]
CAmount CWalletTx::GetDebit | ( | const isminefilter & | filter | ) | const |
filter decides which addresses will count towards the debit
Definition at line 2169 of file wallet.cpp.
References CWalletTx::fDebitCached, CWalletTx::fWatchDebitCached, CWallet::GetDebit(), ISMINE_SPENDABLE, ISMINE_WATCH_ONLY, CWalletTx::nDebitCached, CWalletTx::nWatchDebitCached, CWalletTx::pwallet, and CMerkleTx::tx.
Referenced by TransactionRecord::decomposeTransaction(), CWalletTx::GetAmounts(), CWallet::GetLegacyBalance(), gettransaction(), CWalletTx::IsFromMe(), and TransactionDesc::toHTML().
◆ GetDebit() [2/3]
CAmount CWallet::GetDebit | ( | const CTxIn & | txin, |
const isminefilter & | filter | ||
) | const |
Returns amount of debit if the input matches the filter, otherwise returns 0.
Definition at line 1559 of file wallet.cpp.
References CWallet::cs_wallet, COutPoint::hash, CWallet::IsMine(), LOCK, CWallet::mapWallet, COutPoint::n, CTxIn::prevout, and CMerkleTx::tx.
Referenced by CWalletTx::GetDebit(), CWallet::GetDebit(), CWallet::IsFromMe(), and TransactionDesc::toHTML().
◆ GetDebit() [3/3]
CAmount CWallet::GetDebit | ( | const CTransaction & | tx, |
const isminefilter & | filter | ||
) | const |
Definition at line 1866 of file wallet.cpp.
References CWallet::GetDebit(), MoneyRange(), and CTransaction::vin.
◆ GetDecryptedHDChain()
bool CWallet::GetDecryptedHDChain | ( | CHDChain & | hdChainRet | ) |
Definition at line 1826 of file wallet.cpp.
References CWallet::cs_wallet, CCryptoKeyStore::DecryptHDChain(), CCryptoKeyStore::GetHDChain(), CHDChain::GetID(), CHDChain::GetSeedHash(), and LOCK.
Referenced by dumphdinfo(), and dumpwallet().
◆ GetDenominatedCredit()
Definition at line 2360 of file wallet.cpp.
References CWalletTx::fDenomConfCreditCached, CWalletTx::fDenomUnconfCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::GetDepthInMainChain(), CMerkleTx::GetHash(), CMerkleTx::IsCoinBase(), CPrivateSend::IsDenominatedAmount(), ISMINE_SPENDABLE, CWallet::IsSpent(), CWalletTx::IsTrusted(), MoneyRange(), CWalletTx::nDenomConfCreditCached, CWalletTx::nDenomUnconfCreditCached, CTxOut::nValue, CWalletTx::pwallet, and CMerkleTx::tx.
◆ GetImmatureCredit()
Definition at line 2233 of file wallet.cpp.
References CWalletTx::fImmatureCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::IsCoinBase(), CMerkleTx::IsInMainChain(), ISMINE_SPENDABLE, CWalletTx::nImmatureCreditCached, CWalletTx::pwallet, and CMerkleTx::tx.
Referenced by BOOST_FIXTURE_TEST_CASE().
◆ GetImmatureWatchOnlyCredit()
Definition at line 2277 of file wallet.cpp.
References CWalletTx::fImmatureWatchCreditCached, CMerkleTx::GetBlocksToMaturity(), CWallet::GetCredit(), CMerkleTx::IsCoinBase(), CMerkleTx::IsInMainChain(), ISMINE_WATCH_ONLY, CWalletTx::nImmatureWatchCreditCached, CWalletTx::pwallet, and CMerkleTx::tx.
◆ GetKey()
GetKey implementation that can derive a HD private key on the fly.
Reimplemented from CCryptoKeyStore.
Definition at line 300 of file wallet.cpp.
References CWallet::cs_wallet, CCryptoKeyStore::DecryptHDChain(), CHDChain::DeriveChildExtKey(), CHDPubKey::extPubKey, CCryptoKeyStore::GetHDChain(), CHDChain::GetID(), CCryptoKeyStore::GetKey(), CHDChain::GetSeedHash(), CExtKey::key, LOCK, CWallet::mapHdPubKeys, CHDPubKey::nAccountIndex, CHDPubKey::nChangeIndex, and CExtPubKey::nChild.
Referenced by dumpprivkey(), dumpwallet(), CWallet::GetOutpointAndKeysFromOutput(), WalletModel::getPrivKey(), ParsePrivKey(), and signmessage().
◆ GetPubKey()
GetPubKey implementation that also checks the mapHdPubKeys.
Reimplemented from CCryptoKeyStore.
Definition at line 286 of file wallet.cpp.
References CWallet::cs_wallet, CHDPubKey::extPubKey, CCryptoKeyStore::GetPubKey(), LOCK, CWallet::mapHdPubKeys, and CExtPubKey::pubkey.
Referenced by WalletModel::getPubKey().
◆ GetRealOutpointPrivateSendRounds()
int CWallet::GetRealOutpointPrivateSendRounds | ( | const COutPoint & | outpoint, |
int | nRounds = 0 |
||
) | const |
Definition at line 1576 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::GetWalletTx(), COutPoint::hash, CPrivateSend::IsCollateralAmount(), CPrivateSend::IsDenominatedAmount(), CWallet::IsMine(), LOCK, LogPrint, CWallet::mapOutpointRoundsCache, MAX_PRIVATESEND_ROUNDS, COutPoint::n, CPrivateSendClientManager::nPrivateSendRandomRounds, BCLog::PRIVATESEND, privateSendClient, COutPoint::ToStringShort(), and CMerkleTx::tx.
Referenced by CWallet::GetCappedOutpointPrivateSendRounds(), WalletModel::getRealOutpointPrivateSendRounds(), CWallet::IsFullyMixed(), listunspent(), and CWallet::SelectPSInOutPairsByDenominations().
◆ GetTxTime()
int64_t CWalletTx::GetTxTime | ( | ) | const |
Definition at line 1923 of file wallet.cpp.
References CWalletTx::nTimeReceived, and CWalletTx::nTimeSmart.
Referenced by TransactionRecord::decomposeTransaction(), TransactionDesc::toHTML(), CoinControlDialog::updateView(), and WalletTxToJSON().
◆ GetWalletTx()
Definition at line 178 of file wallet.cpp.
References CWallet::cs_wallet, LOCK, and CWallet::mapWallet.
Referenced by BOOST_FIXTURE_TEST_CASE(), CWallet::GetRealOutpointPrivateSendRounds(), CWalletTx::IsTrusted(), and CWallet::TransactionCanBeAbandoned().
◆ HaveKey()
|
overridevirtual |
HaveKey implementation that also checks the mapHdPubKeys.
Reimplemented from CCryptoKeyStore.
Definition at line 328 of file wallet.cpp.
References CWallet::cs_wallet, CCryptoKeyStore::HaveKey(), LOCK, and CWallet::mapHdPubKeys.
Referenced by CheckWalletOwnsKey(), CheckWalletOwnsScript(), CWallet::DeriveNewChildKey(), importelectrumwallet(), importprivkey(), importwallet(), ProcessImport(), and CWallet::ReserveKeyFromKeyPool().
◆ IncOrderPosNext()
int64_t CWallet::IncOrderPosNext | ( | WalletBatch * | batch = nullptr | ) |
Increment the next transaction order id.
- Returns
- next transaction order id
Definition at line 997 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CWallet::nOrderPosNext, and WalletBatch::WriteOrderPosNext().
Referenced by CWallet::AccountMove(), and CWallet::AddToWallet().
◆ InMempool()
bool CWalletTx::InMempool | ( | ) | const |
Definition at line 2414 of file wallet.cpp.
References CWalletTx::fInMempool.
Referenced by TransactionDesc::FormatTxStatus(), CWalletTx::IsTrusted(), CWalletTx::RelayWalletTransaction(), and CWallet::TransactionCanBeAbandoned().
◆ IsAllFromMe()
bool CWallet::IsAllFromMe | ( | const CTransaction & | tx, |
const isminefilter & | filter | ||
) | const |
Returns whether all of the inputs match the filter.
Definition at line 1878 of file wallet.cpp.
References CWallet::cs_wallet, COutPoint::hash, CWallet::IsMine(), LOCK, CWallet::mapWallet, COutPoint::n, CTxIn::prevout, CMerkleTx::tx, and CTransaction::vin.
◆ IsChange()
bool CWallet::IsChange | ( | const CTxOut & | txout | ) | const |
Definition at line 1715 of file wallet.cpp.
References CWallet::cs_wallet, ExtractDestination(), CWallet::IsMine(), LOCK, CWallet::mapAddressBook, and CTxOut::scriptPubKey.
Referenced by CWallet::FindNonChangeParentOutput(), CWallet::GetAddressGroupings(), CWalletTx::GetAmounts(), CWallet::GetChange(), and CWallet::GetLegacyBalance().
◆ IsDenominated()
bool CWallet::IsDenominated | ( | const COutPoint & | outpoint | ) | const |
Definition at line 1664 of file wallet.cpp.
References CWallet::cs_wallet, COutPoint::hash, CPrivateSend::IsDenominatedAmount(), LOCK, CWallet::mapWallet, and COutPoint::n.
Referenced by TransactionRecord::decomposeTransaction(), and CWallet::GetAverageAnonymizedRounds().
◆ IsEquivalentTo()
bool CWalletTx::IsEquivalentTo | ( | const CWalletTx & | tx | ) | const |
Definition at line 2452 of file wallet.cpp.
References CMerkleTx::tx, and CMutableTransaction::vin.
Referenced by CWallet::SyncMetaData().
◆ IsFromMe()
bool CWallet::IsFromMe | ( | const CTransaction & | tx | ) | const |
should probably be renamed to IsRelevantToMe
Definition at line 1861 of file wallet.cpp.
References CWallet::GetDebit(), and ISMINE_ALL.
Referenced by CWallet::AddToWalletIfInvolvingMe().
◆ IsFullyMixed()
bool CWallet::IsFullyMixed | ( | const COutPoint & | outpoint | ) | const |
Definition at line 1680 of file wallet.cpp.
References base_blob< BITS >::begin(), CDataStream::data(), uint256::GetCheapHash(), CWallet::GetRealOutpointPrivateSendRounds(), CPrivateSendClientManager::nPrivateSendRandomRounds, CPrivateSendClientManager::nPrivateSendRounds, CWallet::nPrivateSendSalt, privateSendClient, PROTOCOL_VERSION, SER_GETHASH, CDataStream::size(), and CSHA256::Write().
Referenced by CWallet::AvailableCoins(), CWalletTx::GetAnonymizedCredit(), WalletModel::isFullyMixed(), CWallet::SelectCoins(), and CWallet::SelectCoinsGroupedByAddresses().
◆ IsHDEnabled()
bool CWallet::IsHDEnabled | ( | ) | const |
HD Wallet Functions.
Definition at line 1847 of file wallet.cpp.
References CCryptoKeyStore::GetHDChain().
Referenced by CWallet::EncryptWallet(), CWallet::GenerateNewKey(), WalletModel::hdEnabled(), keypoolrefill(), CWallet::ReserveKeyFromKeyPool(), and CWallet::TopUpKeyPool().
◆ IsMine() [1/3]
isminetype CWallet::IsMine | ( | const CTxIn & | txin | ) | const |
Definition at line 1542 of file wallet.cpp.
References CWallet::cs_wallet, COutPoint::hash, ISMINE_NO, LOCK, CWallet::mapWallet, COutPoint::n, CTxIn::prevout, and CMerkleTx::tx.
Referenced by CWallet::AddToWallet(), CWallet::AddToWalletIfInvolvingMe(), CWallet::AutoLockMasternodeCollaterals(), CWallet::AvailableCoins(), TransactionRecord::decomposeTransaction(), CWallet::DelAddressBook(), CWallet::FindNonChangeParentOutput(), CWallet::GetAddressBalances(), CWallet::GetAddressGroupings(), CWalletTx::GetAmounts(), CWallet::GetCredit(), CWallet::GetDebit(), CWallet::GetLegacyBalance(), CWallet::GetRealOutpointPrivateSendRounds(), importprunedfunds(), CWallet::IsAllFromMe(), CWallet::IsChange(), CWallet::IsMine(), CWalletTx::IsTrusted(), CWallet::ListCoins(), CWallet::LoadWallet(), CWallet::SelectCoinsGroupedByAddresses(), CWallet::SetAddressBook(), and TransactionDesc::toHTML().
◆ IsMine() [2/3]
isminetype CWallet::IsMine | ( | const CTxOut & | txout | ) | const |
Definition at line 1703 of file wallet.cpp.
References IsMine(), and CTxOut::scriptPubKey.
◆ IsMine() [3/3]
bool CWallet::IsMine | ( | const CTransaction & | tx | ) | const |
Definition at line 1853 of file wallet.cpp.
References CWallet::IsMine(), and CTransaction::vout.
◆ IsSpent()
bool CWallet::IsSpent | ( | const uint256 & | hash, |
unsigned int | n | ||
) | const |
Outpoint is spent if any non-conflicted transaction spends it:
Definition at line 755 of file wallet.cpp.
References CWallet::mapTxSpends, and CWallet::mapWallet.
Referenced by CWallet::AddToWallet(), CWallet::AutoLockMasternodeCollaterals(), CWallet::AvailableCoins(), CWallet::GetAddressBalances(), CWalletTx::GetAnonymizedCredit(), CWalletTx::GetAvailableCredit(), CWalletTx::GetAvailableWatchOnlyCredit(), CWalletTx::GetDenominatedCredit(), WalletModel::isSpent(), CWallet::LoadWallet(), lockunspent(), and CWallet::SelectCoinsGroupedByAddresses().
◆ IsTrusted()
bool CWalletTx::IsTrusted | ( | ) | const |
Definition at line 2419 of file wallet.cpp.
References bSpendZeroConfChange, CheckFinalTx(), CMerkleTx::GetDepthInMainChain(), CWallet::GetWalletTx(), COutPoint::hash, CWalletTx::InMempool(), CWalletTx::IsFromMe(), CMerkleTx::IsLockedByInstantSend(), CWallet::IsMine(), ISMINE_ALL, ISMINE_SPENDABLE, COutPoint::n, CTxIn::prevout, CWalletTx::pwallet, and CMerkleTx::tx.
Referenced by CWallet::GetAddressBalances(), CWalletTx::GetDenominatedCredit(), CWallet::SelectCoinsGroupedByAddresses(), TransactionRecord::updateStatus(), and WalletTxToJSON().
◆ LoadCryptedKey()
bool CWallet::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)
Definition at line 446 of file wallet.cpp.
References CCryptoKeyStore::AddCryptedKey().
Referenced by ReadKeyValue().
◆ LoadCScript()
bool CWallet::LoadCScript | ( | const CScript & | redeemScript | ) |
Definition at line 474 of file wallet.cpp.
References CBasicKeyStore::AddCScript(), EncodeDestination(), LogPrintf, MAX_SCRIPT_ELEMENT_SIZE, and prevector< N, T, Size, Diff >::size().
Referenced by ReadKeyValue().
◆ LoadHDPubKey()
bool CWallet::LoadHDPubKey | ( | const CHDPubKey & | hdPubKey | ) |
loads a HDPubKey into the wallets memory
Definition at line 336 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CHDPubKey::extPubKey, CPubKey::GetID(), CWallet::mapHdPubKeys, and CExtPubKey::pubkey.
Referenced by ReadKeyValue().
◆ LoadKeyMetadata()
bool CWallet::LoadKeyMetadata | ( | const CKeyID & | keyID, |
const CKeyMetadata & | metadata | ||
) |
Load metadata (used by LoadWallet)
Definition at line 430 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CWallet::mapKeyMetadata, CKeyMetadata::nCreateTime, and CWallet::UpdateTimeFirstKey().
Referenced by ReadKeyValue().
◆ LoadScriptMetadata()
bool CWallet::LoadScriptMetadata | ( | const CScriptID & | script_id, |
const CKeyMetadata & | metadata | ||
) |
Definition at line 438 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, CWallet::m_script_metadata, CKeyMetadata::nCreateTime, and CWallet::UpdateTimeFirstKey().
Referenced by ReadKeyValue().
◆ LoadToWallet()
bool CWallet::LoadToWallet | ( | const CWalletTx & | wtxIn | ) |
Definition at line 1181 of file wallet.cpp.
References CWallet::AddToSpends(), CWalletTx::BindWallet(), CMerkleTx::GetHash(), COutPoint::hash, CMerkleTx::hashBlock, CMerkleTx::hashUnset(), CWalletTx::m_it_wtxOrdered, CWallet::mapWallet, CWallet::MarkConflicted(), CMerkleTx::nIndex, CWalletTx::nOrderPos, CTxIn::prevout, CMerkleTx::tx, and CWallet::wtxOrdered.
Referenced by ReadKeyValue().
◆ LoadWatchOnly()
bool CWallet::LoadWatchOnly | ( | const CScript & | dest | ) |
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
Definition at line 519 of file wallet.cpp.
References CBasicKeyStore::AddWatchOnly().
Referenced by ReadKeyValue().
◆ MarkConflicted()
Definition at line 1347 of file wallet.cpp.
References base_blob< BITS >::begin(), chainActive, CChain::Contains(), cs_main, CWallet::cs_wallet, CWallet::database, done, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, CMerkleTx::GetDepthInMainChain(), COutPoint::hash, CChain::Height(), LOCK2, mapBlockIndex, CWallet::mapTxSpends, CWallet::mapWallet, CBlockIndex::nHeight, CTxIn::prevout, and WalletBatch::WriteTx().
Referenced by CWallet::AddToWalletIfInvolvingMe(), and CWallet::LoadToWallet().
◆ MarkDirty()
void CWallet::MarkDirty | ( | ) |
Definition at line 1082 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, LOCK, and CWallet::mapWallet.
Referenced by importprivkey(), ImportScript(), importwallet(), ProcessImport(), and CWallet::ZapSelectTx().
◆ Priority()
int COutput::Priority | ( | ) | const |
Definition at line 166 of file wallet.cpp.
References COIN, CPrivateSend::GetStandardDenominations(), COutput::i, CMerkleTx::tx, and COutput::tx.
Referenced by CompareByPriority::operator()().
◆ ReacceptWalletTransactions()
void CWallet::ReacceptWalletTransactions | ( | ) |
Definition at line 2106 of file wallet.cpp.
References CWalletTx::AcceptToMemoryPool(), CTxMemPool::cs, cs_main, CWallet::cs_wallet, CWallet::fBroadcastTransactions, CMerkleTx::GetDepthInMainChain(), CMerkleTx::GetHash(), CMerkleTx::isAbandoned(), CMerkleTx::IsCoinBase(), CMerkleTx::IsLockedByInstantSend(), LOCK, LOCK2, CWallet::mapWallet, maxTxFee, mempool, and CWalletTx::nOrderPos.
Referenced by importaddress(), importmulti(), importpubkey(), and CWallet::postInitProcess().
◆ RelayWalletTransaction()
bool CWalletTx::RelayWalletTransaction | ( | CConnman * | connman | ) |
Definition at line 2137 of file wallet.cpp.
References CWalletTx::AcceptToMemoryPool(), CWallet::GetBroadcastTransactions(), CMerkleTx::GetDepthInMainChain(), CMerkleTx::GetHash(), CWalletTx::InMempool(), CMerkleTx::isAbandoned(), CMerkleTx::IsCoinBase(), LogPrintf, maxTxFee, CWalletTx::pwallet, CConnman::RelayTransaction(), base_blob< BITS >::ToString(), and CMerkleTx::tx.
Referenced by CWallet::CommitTransaction(), and CWallet::ResendWalletTransactionsBefore().
◆ RemoveWatchOnly()
|
overridevirtual |
Reimplemented from CBasicKeyStore.
Definition at line 506 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, WalletBatch::EraseWatchOnly(), CBasicKeyStore::HaveWatchOnly(), CWallet::NotifyWatchonlyChanged, and CBasicKeyStore::RemoveWatchOnly().
Referenced by CWallet::AddHDPubKey(), and CWallet::AddKeyPubKeyWithDB().
◆ ReorderTransactions()
DBErrors CWallet::ReorderTransactions | ( | ) |
Definition at line 920 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::database, DB_LOAD_FAIL, DB_LOAD_OK, WalletBatch::ListAccountCreditDebit(), LOCK, CWallet::mapWallet, CAccountingEntry::nEntryNo, CWalletTx::nOrderPos, CAccountingEntry::nOrderPos, CWallet::nOrderPosNext, CWalletTx::nTimeReceived, WalletBatch::WriteAccountingEntry(), WalletBatch::WriteOrderPosNext(), and WalletBatch::WriteTx().
Referenced by GetResults(), and WalletBatch::LoadWallet().
◆ RescanFromTime()
int64_t CWallet::RescanFromTime | ( | int64_t | startTime, |
const WalletRescanReserver & | reserver, | ||
bool | update | ||
) |
Scan active chain for relevant transactions after importing keys.
This should be called whenever new keys are added to the wallet, with the oldest key creation time.
- Returns
- Earliest timestamp that could be successfully scanned from. Timestamp returned will be higher than startTime if relevant blocks could not be read.
Definition at line 1993 of file wallet.cpp.
References chainActive, cs_main, CChain::FindEarliestAtLeast(), CBlockIndex::GetBlockTimeMax(), CChain::Height(), LOCK, LogPrintf, CBlockIndex::nHeight, CWallet::ScanForWalletTransactions(), and TIMESTAMP_WINDOW.
Referenced by importaddress(), importmulti(), importprivkey(), importpubkey(), and importwallet().
◆ ResendWalletTransactions()
|
overridevirtual |
Tells listeners to broadcast their data.
Reimplemented from CValidationInterface.
Definition at line 2486 of file wallet.cpp.
References CWallet::fBroadcastTransactions, GetRand(), GetTime(), LogPrintf, CWallet::nLastResend, CWallet::nNextResend, and CWallet::ResendWalletTransactionsBefore().
◆ ResendWalletTransactionsBefore()
std::vector< uint256 > CWallet::ResendWalletTransactionsBefore | ( | int64_t | nTime, |
CConnman * | connman | ||
) |
Definition at line 2461 of file wallet.cpp.
References CTxMemPool::cs, CWallet::cs_wallet, CMerkleTx::GetHash(), LOCK2, CWallet::mapWallet, mempool, CWalletTx::nTimeReceived, and CWalletTx::RelayWalletTransaction().
Referenced by CWallet::ResendWalletTransactions(), and resendwallettransactions().
◆ ScanForWalletTransactions()
CBlockIndex * CWallet::ScanForWalletTransactions | ( | CBlockIndex * | pindexStart, |
CBlockIndex * | pindexStop, | ||
const WalletRescanReserver & | reserver, | ||
bool | fUpdate = false |
||
) |
Scan the block chain (starting in pindexStart) for transactions from or to us.
If fUpdate is true, found transactions that already exist in the wallet will be updated.
Returns null if scan was successful. Otherwise, if a complete rescan was not possible (due to pruning or corruption), returns pointer to the most recent block that could not be scanned.
If pindexStop is not a nullptr, the scan will stop at the block-index defined by pindexStop
Caller needs to make sure pindexStop (and the optional pindexStart) are on the main chain after to the addition of any new keys you want to detect transactions for.
Definition at line 2030 of file wallet.cpp.
References _(), CWallet::AddToWalletIfInvolvingMe(), chainActive, CChain::Contains(), cs_main, CWallet::cs_wallet, CWallet::fAbortRescan, GetTime(), GuessVerificationProgress(), WalletRescanReserver::isReserved(), LOCK, LOCK2, LogPrintf, CChain::Next(), CBlockIndex::nHeight, Params(), ReadBlockFromDisk(), CWallet::ShowProgress, CChain::Tip(), CChainParams::TxData(), and CBlock::vtx.
Referenced by BOOST_FIXTURE_TEST_CASE(), importelectrumwallet(), rescanblockchain(), and CWallet::RescanFromTime().
◆ SetBestChain()
|
overridevirtual |
Notifies listeners of the new active block chain on-disk.
Called on a background thread.
Reimplemented from CValidationInterface.
Definition at line 641 of file wallet.cpp.
References CWallet::database, and WalletBatch::WriteBestBlock().
◆ SetCryptedHDChain()
bool CWallet::SetCryptedHDChain | ( | WalletBatch & | batch, |
const CHDChain & | chain, | ||
bool | memonly | ||
) |
Definition at line 1794 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::encrypted_batch, LOCK, CCryptoKeyStore::SetCryptedHDChain(), and WalletBatch::WriteCryptedHDChain().
Referenced by CWallet::DeriveNewChildKey(), CWallet::EncryptWallet(), and CWallet::SetCryptedHDChainSingle().
◆ SetCryptedHDChainSingle()
bool CWallet::SetCryptedHDChainSingle | ( | const CHDChain & | chain, |
bool | memonly | ||
) |
Definition at line 1820 of file wallet.cpp.
References CWallet::database, and CWallet::SetCryptedHDChain().
Referenced by ReadKeyValue().
◆ SetHDChain()
bool CWallet::SetHDChain | ( | WalletBatch & | batch, |
const CHDChain & | chain, | ||
bool | memonly | ||
) |
Definition at line 1781 of file wallet.cpp.
References CWallet::cs_wallet, LOCK, CCryptoKeyStore::SetHDChain(), and WalletBatch::WriteHDChain().
Referenced by CWallet::DeriveNewChildKey(), and CWallet::SetHDChainSingle().
◆ SetHDChainSingle()
bool CWallet::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.
Definition at line 1814 of file wallet.cpp.
References CWallet::database, and CWallet::SetHDChain().
Referenced by CWallet::GenerateNewHDChain(), and ReadKeyValue().
◆ SetMaxVersion()
bool CWallet::SetMaxVersion | ( | int | nVersion | ) |
change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format)
Definition at line 673 of file wallet.cpp.
References CWallet::cs_wallet, LOCK, CWallet::nWalletMaxVersion, and CWallet::nWalletVersion.
◆ SetMinVersion()
bool CWallet::SetMinVersion | ( | enum WalletFeature | nVersion, |
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
Definition at line 647 of file wallet.cpp.
References CWallet::cs_wallet, CWallet::database, FEATURE_LATEST, LOCK, CWallet::nWalletMaxVersion, CWallet::nWalletVersion, and WalletBatch::WriteMinVersion().
Referenced by CWallet::EncryptWallet(), and CWallet::GenerateNewKey().
◆ SyncMetaData()
|
private |
Definition at line 713 of file wallet.cpp.
References CWalletTx::fFromMe, CWalletTx::IsEquivalentTo(), CWalletTx::mapValue, CWallet::mapWallet, CWalletTx::nOrderPos, CWalletTx::nTimeSmart, CWalletTx::strFromAccount, and CWalletTx::vOrderForm.
Referenced by CWallet::AddToSpends().
◆ SyncTransaction()
|
private |
Definition at line 1411 of file wallet.cpp.
References CWallet::AddToWalletIfInvolvingMe(), CWallet::fAnonymizableTallyCached, CWallet::fAnonymizableTallyCachedNonDenom, COutPoint::hash, CWallet::mapWallet, CTxIn::prevout, and CTransaction::vin.
Referenced by CWallet::BlockConnected(), CWallet::BlockDisconnected(), and CWallet::TransactionAddedToMempool().
◆ ToString()
std::string COutput::ToString | ( | ) | const |
Definition at line 129 of file wallet.cpp.
References FormatMoney(), CMerkleTx::GetHash(), COutput::i, COutput::nDepth, strprintf, base_blob< BITS >::ToString(), CMerkleTx::tx, and COutput::tx.
◆ TransactionAddedToMempool()
|
overridevirtual |
Notifies listeners of a transaction having been added to mempool.
Called on a background thread.
Reimplemented from CValidationInterface.
Definition at line 1431 of file wallet.cpp.
References cs_main, CWallet::cs_wallet, LOCK2, CWallet::mapWallet, and CWallet::SyncTransaction().
◆ TransactionCanBeAbandoned()
bool CWallet::TransactionCanBeAbandoned | ( | const uint256 & | hashTx | ) | const |
Return whether transaction can be abandoned.
Definition at line 1276 of file wallet.cpp.
References cs_main, CWallet::cs_wallet, CMerkleTx::GetDepthInMainChain(), CWallet::GetWalletTx(), CWalletTx::InMempool(), CMerkleTx::isAbandoned(), and LOCK2.
Referenced by WalletModel::transactionCanBeAbandoned().
◆ TransactionRemovedFromMempool()
|
overridevirtual |
Notifies listeners of a transaction leaving mempool.
This only fires for transactions which leave mempool because of expiry, size limiting, reorg (changes in lock times/coinbase maturity), or replacement. This does not include any transactions which are included in BlockConnectedDisconnected either in block->vtx or in txnConflicted.
Called on a background thread.
Reimplemented from CValidationInterface.
Definition at line 1441 of file wallet.cpp.
References CWallet::cs_wallet, LOCK, and CWallet::mapWallet.
Referenced by CWallet::BlockConnected().
◆ Unlock()
bool CWallet::Unlock | ( | const SecureString & | strWalletPassphrase, |
bool | fForMixingOnly = false |
||
) |
Definition at line 524 of file wallet.cpp.
References CWallet::cs_wallet, CCrypter::Decrypt(), gArgs, ArgsManager::GetArg(), ArgsManager::GetBoolArg(), CCryptoKeyStore::IsLocked(), keePassInt, LOCK, LogPrintf, CWallet::mapMasterKeys, nWalletBackups, CKeePassIntegrator::retrievePassphrase(), CCrypter::SetKeyFromPassphrase(), CWallet::TopUpKeyPool(), and CCryptoKeyStore::Unlock().
Referenced by CWallet::EncryptWallet(), WalletModel::setWalletLocked(), and walletpassphrase().
◆ UpdateTimeFirstKey()
void CWallet::UpdateTimeFirstKey | ( | int64_t | nCreateTime | ) |
Update wallet first key creation time.
This should be called whenever keys are added to the wallet, with the oldest key creation time.
Definition at line 455 of file wallet.cpp.
References AssertLockHeld(), CWallet::cs_wallet, and CWallet::nTimeFirstKey.
Referenced by CWallet::AddWatchOnly(), CWallet::DeriveNewChildKey(), CWallet::GenerateNewKey(), importelectrumwallet(), importprivkey(), importwallet(), CWallet::LoadKeyMetadata(), CWallet::LoadScriptMetadata(), WalletBatch::LoadWallet(), and ProcessImport().