Anoncoin  0.9.4
P2P Digital Currency
Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
CWallet Class Reference

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]

Public Types

typedef std::map< unsigned int, CMasterKeyMasterKeyMap
 
typedef std::pair< CWalletTx *, CAccountingEntry * > TxPair
 
typedef std::multimap< int64_t, TxPairTxItems
 

Public Member Functions

 CWallet ()
 
 CWallet (std::string strWalletFileIn)
 
void SetNull ()
 
const CWalletTxGetWalletTx (const uint256 &hash) const
 
bool CanSupportFeature (enum WalletFeature wf)
 
void AvailableCoins (std::vector< COutput > &vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const
 
bool SelectCoinsMinConf (int64_t nTargetValue, int nConfMine, int nConfTheirs, std::vector< COutput > vCoins, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, int64_t &nValueRet) const
 
bool IsSpent (const uint256 &hash, unsigned int n) const
 
bool IsLockedCoin (uint256 hash, unsigned int n) const
 
void LockCoin (COutPoint &output)
 
void UnlockCoin (COutPoint &output)
 
void UnlockAllCoins ()
 
void ListLockedCoins (std::vector< COutPoint > &vOutpts)
 
CPubKey GenerateNewKey ()
 
bool AddKeyPubKey (const CKey &key, const CPubKey &pubkey)
 
bool LoadKey (const CKey &key, const CPubKey &pubkey)
 
bool LoadKeyMetadata (const CPubKey &pubkey, const CKeyMetadata &metadata)
 
bool LoadMinVersion (int nVersion)
 
bool AddCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
 
bool LoadCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
 
bool AddCScript (const CScript &redeemScript)
 
bool LoadCScript (const CScript &redeemScript)
 
bool AddDestData (const CTxDestination &dest, const std::string &key, const std::string &value)
 Adds a destination data tuple to the store, and saves it to disk. More...
 
bool EraseDestData (const CTxDestination &dest, const std::string &key)
 Erases a destination data tuple in the store and on disk. More...
 
bool LoadDestData (const CTxDestination &dest, const std::string &key, const std::string &value)
 Adds a destination data tuple to the store, without saving it to disk. More...
 
bool GetDestData (const CTxDestination &dest, const std::string &key, std::string *value) const
 Look up a destination data tuple in the store, return true if found false otherwise. More...
 
bool AddWatchOnly (const CScript &dest)
 
bool RemoveWatchOnly (const CScript &dest)
 
bool LoadWatchOnly (const CScript &dest)
 
bool Unlock (const SecureString &strWalletPassphrase)
 
bool ChangeWalletPassphrase (const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
 
bool EncryptWallet (const SecureString &strWalletPassphrase)
 
void GetKeyBirthTimes (std::map< CKeyID, int64_t > &mapKeyBirth) const
 
int64_t IncOrderPosNext (CWalletDB *pwalletdb=NULL)
 Increment the next transaction order id. More...
 
TxItems OrderedTxItems (std::list< CAccountingEntry > &acentries, std::string strAccount="")
 Get the wallet's activity log. More...
 
void MarkDirty ()
 
bool AddToWallet (const CWalletTx &wtxIn, bool fFromLoadWallet=false)
 
void SyncTransaction (const uint256 &hash, const CTransaction &tx, const CBlock *pblock)
 
bool AddToWalletIfInvolvingMe (const uint256 &hash, const CTransaction &tx, const CBlock *pblock, bool fUpdate)
 
void EraseFromWallet (const uint256 &hash)
 
int ScanForWalletTransactions (CBlockIndex *pindexStart, bool fUpdate=false)
 
void ReacceptWalletTransactions ()
 
void ResendWalletTransactions ()
 
int64_t GetBalance () const
 
int64_t GetUnconfirmedBalance () const
 
int64_t GetImmatureBalance () const
 
int64_t GetWatchOnlyBalance () const
 
int64_t GetUnconfirmedWatchOnlyBalance () const
 
int64_t GetImmatureWatchOnlyBalance () const
 
bool CreateTransaction (const std::vector< std::pair< CScript, int64_t > > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, int64_t &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl=NULL)
 
bool CreateTransaction (CScript scriptPubKey, int64_t nValue, CWalletTx &wtxNew, CReserveKey &reservekey, int64_t &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl=NULL)
 
bool CommitTransaction (CWalletTx &wtxNew, CReserveKey &reservekey)
 
std::string SendMoney (CScript scriptPubKey, int64_t nValue, CWalletTx &wtxNew)
 
std::string SendMoneyToDestination (const CTxDestination &address, int64_t nValue, CWalletTx &wtxNew)
 
bool NewKeyPool ()
 
bool TopUpKeyPool (unsigned int kpSize=0)
 
int64_t AddReserveKey (const CKeyPool &keypool)
 
void ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool)
 
void KeepKey (int64_t nIndex)
 
void ReturnKey (int64_t nIndex)
 
bool GetKeyFromPool (CPubKey &key)
 
int64_t GetOldestKeyPoolTime ()
 
void GetAllReserveKeys (std::set< CKeyID > &setAddress) const
 
std::set< std::set< CTxDestination > > GetAddressGroupings ()
 
std::map< CTxDestination, int64_t > GetAddressBalances ()
 
std::set< CTxDestinationGetAccountAddresses (std::string strAccount) const
 
isminetype IsMine (const CTxIn &txin) const
 
int64_t GetDebit (const CTxIn &txin, const isminefilter &filter) const
 
isminetype IsMine (const CTxOut &txout) const
 
int64_t GetCredit (const CTxOut &txout, const isminefilter &filter) const
 
bool IsChange (const CTxOut &txout) const
 
int64_t GetChange (const CTxOut &txout) const
 
bool IsMine (const CTransaction &tx) const
 
bool IsFromMe (const CTransaction &tx) const
 
int64_t GetDebit (const CTransaction &tx, const isminefilter &filter) const
 
int64_t GetCredit (const CTransaction &tx, const isminefilter &filter) const
 
int64_t GetChange (const CTransaction &tx) const
 
void SetBestChain (const CBlockLocator &loc)
 
DBErrors LoadWallet (bool &fFirstRunRet)
 
DBErrors ZapWalletTx ()
 
bool SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose)
 
bool DelAddressBook (const CTxDestination &address)
 
void UpdatedTransaction (const uint256 &hashTx)
 
void Inventory (const uint256 &hash)
 
unsigned int GetKeyPoolSize ()
 
bool SetDefaultKey (const CPubKey &vchPubKey)
 
bool SetMinVersion (enum WalletFeature, CWalletDB *pwalletdbIn=NULL, bool fExplicit=false)
 
bool SetMaxVersion (int nVersion)
 
int GetVersion ()
 
std::set< uint256GetConflicts (const uint256 &txid) const
 
- Public Member Functions inherited from CCryptoKeyStore
 CCryptoKeyStore ()
 
bool IsCrypted () const
 
bool IsLocked () const
 
bool Lock ()
 
bool HaveKey (const CKeyID &address) const
 
bool GetKey (const CKeyID &address, CKey &keyOut) const
 
bool GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
 
void GetKeys (std::set< CKeyID > &setAddress) const
 
- Public Member Functions inherited from CBasicKeyStore
bool HaveKey (const CKeyID &address) const
 
void GetKeys (std::set< CKeyID > &setAddress) 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
 
- Public Member Functions inherited from CKeyStore
virtual ~CKeyStore ()
 
virtual bool AddKey (const CKey &key)
 

Public Attributes

CCriticalSection cs_wallet
 Main wallet lock. More...
 
bool fFileBacked
 
std::string strWalletFile
 
std::set< int64_t > setKeyPool
 
std::map< CKeyID, CKeyMetadatamapKeyMetadata
 
MasterKeyMap mapMasterKeys
 
unsigned int nMasterKeyMaxID
 
std::map< uint256, CWalletTxmapWallet
 
int64_t nOrderPosNext
 
std::map< uint256, int > mapRequestCount
 
std::map< CTxDestination, CAddressBookDatamapAddressBook
 
CPubKey vchDefaultKey
 
std::set< COutPointsetLockedCoins
 
int64_t nTimeFirstKey
 
boost::signals2::signal< void(CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, const std::string &purpose, ChangeType status)> NotifyAddressBookChanged
 Address book entry changed. More...
 
boost::signals2::signal< void(CWallet *wallet, const uint256 &hashTx, ChangeType status)> NotifyTransactionChanged
 Wallet transaction added, removed or updated. More...
 
boost::signals2::signal< void(const std::string &title, int nProgress)> ShowProgress
 Show progress e.g. More...
 
boost::signals2::signal< void(bool fHaveWatchOnly)> NotifyWatchonlyChanged
 Watch-only address added. More...
 
- Public Attributes inherited from CCryptoKeyStore
boost::signals2::signal< void(CCryptoKeyStore *wallet)> NotifyStatusChanged
 

Private Types

typedef std::multimap< COutPoint, uint256TxSpends
 

Private Member Functions

bool SelectCoins (int64_t nTargetValue, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, int64_t &nValueRet, const CCoinControl *coinControl=NULL) const
 
void AddToSpends (const COutPoint &outpoint, const uint256 &wtxid)
 
void AddToSpends (const uint256 &wtxid)
 
void SyncMetaData (std::pair< TxSpends::iterator, TxSpends::iterator >)
 

Private Attributes

CWalletDBpwalletdbEncryption
 
int nWalletVersion
 
int nWalletMaxVersion
 
int64_t nNextResend
 
int64_t nLastResend
 
TxSpends mapTxSpends
 

Additional Inherited Members

- Protected Member Functions inherited from CCryptoKeyStore
bool SetCrypted ()
 
bool EncryptKeys (CKeyingMaterial &vMasterKeyIn)
 
bool Unlock (const CKeyingMaterial &vMasterKeyIn)
 
- Protected Member Functions inherited from CWalletInterface
friend void::RegisterWallet (CWalletInterface *)
 
friend void::UnregisterWallet (CWalletInterface *)
 
friend void::UnregisterAllWallets ()
 
- Protected Attributes inherited from CBasicKeyStore
KeyMap mapKeys
 
ScriptMap mapScripts
 
WatchOnlySet setWatchOnly
 
- Protected Attributes inherited from CKeyStore
CCriticalSection cs_KeyStore
 

Detailed Description

A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, and provides the ability to create new transactions.

Definition at line 101 of file wallet.h.

Member Typedef Documentation

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

Definition at line 141 of file wallet.h.

typedef std::multimap<int64_t, TxPair > CWallet::TxItems

Definition at line 244 of file wallet.h.

Definition at line 243 of file wallet.h.

typedef std::multimap<COutPoint, uint256> CWallet::TxSpends
private

Definition at line 120 of file wallet.h.

Constructor & Destructor Documentation

CWallet::CWallet ( )
inline

Definition at line 145 of file wallet.h.

CWallet::CWallet ( std::string  strWalletFileIn)
inline

Definition at line 149 of file wallet.h.

Member Function Documentation

bool CWallet::AddCryptedKey ( const CPubKey vchPubKey,
const std::vector< unsigned char > &  vchCryptedSecret 
)
virtual

Reimplemented from CCryptoKeyStore.

Definition at line 94 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::AddCScript ( const CScript redeemScript)
virtual

Reimplemented from CBasicKeyStore.

Definition at line 130 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::AddKeyPubKey ( const CKey key,
const CPubKey pubkey 
)
virtual

Reimplemented from CCryptoKeyStore.

Definition at line 72 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::AddReserveKey ( const CKeyPool keypool)

Definition at line 1780 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::AddToSpends ( const COutPoint outpoint,
const uint256 wtxid 
)
private

Definition at line 373 of file wallet.cpp.

void CWallet::AddToSpends ( const uint256 wtxid)
private

Definition at line 383 of file wallet.cpp.

bool CWallet::AddToWallet ( const CWalletTx wtxIn,
bool  fFromLoadWallet = false 
)

Definition at line 521 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::AddToWalletIfInvolvingMe ( const uint256 hash,
const CTransaction tx,
const CBlock pblock,
bool  fUpdate 
)

Definition at line 644 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::AddWatchOnly ( const CScript dest)
virtual

Reimplemented from CBasicKeyStore.

Definition at line 155 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::AvailableCoins ( std::vector< COutput > &  vCoins,
bool  fOnlyConfirmed = true,
const CCoinControl coinControl = NULL 
) const

Definition at line 1110 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::CanSupportFeature ( enum WalletFeature  wf)
inline

Definition at line 185 of file wallet.h.

bool CWallet::ChangeWalletPassphrase ( const SecureString strOldWalletPassphrase,
const SecureString strNewWalletPassphrase 
)

Definition at line 205 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::CommitTransaction ( CWalletTx wtxNew,
CReserveKey reservekey 
)

Definition at line 1491 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::CreateTransaction ( const std::vector< std::pair< CScript, int64_t > > &  vecSend,
CWalletTx wtxNew,
CReserveKey reservekey,
int64_t &  nFeeRet,
std::string &  strFailReason,
const CCoinControl coinControl = NULL 
)

Here is the caller graph for this function:

bool CWallet::CreateTransaction ( CScript  scriptPubKey,
int64_t  nValue,
CWalletTx wtxNew,
CReserveKey reservekey,
int64_t &  nFeeRet,
std::string &  strFailReason,
const CCoinControl coinControl = NULL 
)

Definition at line 1482 of file wallet.cpp.

bool CWallet::DelAddressBook ( const CTxDestination address)

Definition at line 1658 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::EncryptWallet ( const SecureString strWalletPassphrase)

Definition at line 394 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::EraseDestData ( const CTxDestination dest,
const std::string &  key 
)

Erases a destination data tuple in the store and on disk.

Definition at line 2160 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::EraseFromWallet ( const uint256 hash)
virtual

Implements CWalletInterface.

Definition at line 678 of file wallet.cpp.

Here is the call graph for this function:

CPubKey CWallet::GenerateNewKey ( )

Definition at line 46 of file wallet.cpp.

Here is the call graph for this function:

set< CTxDestination > CWallet::GetAccountAddresses ( std::string  strAccount) const

Definition at line 1979 of file wallet.cpp.

Here is the caller graph for this function:

std::map< CTxDestination, int64_t > CWallet::GetAddressBalances ( )

Definition at line 1846 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

set< set< CTxDestination > > CWallet::GetAddressGroupings ( )

Definition at line 1886 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::GetAllReserveKeys ( std::set< CKeyID > &  setAddress) const

Definition at line 2030 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetBalance ( ) const

Definition at line 1019 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetChange ( const CTxOut txout) const
inline

Definition at line 302 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetChange ( const CTransaction tx) const
inline

Definition at line 341 of file wallet.h.

Here is the call graph for this function:

set< uint256 > CWallet::GetConflicts ( const uint256 txid) const

Definition at line 296 of file wallet.cpp.

int64_t CWallet::GetCredit ( const CTxOut txout,
const isminefilter filter 
) const
inline

Definition at line 295 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetCredit ( const CTransaction tx,
const isminefilter filter 
) const
inline

Definition at line 330 of file wallet.h.

Here is the call graph for this function:

int64_t CWallet::GetDebit ( const CTxIn txin,
const isminefilter filter 
) const

Definition at line 706 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetDebit ( const CTransaction tx,
const isminefilter filter 
) const
inline

Definition at line 319 of file wallet.h.

Here is the call graph for this function:

bool CWallet::GetDestData ( const CTxDestination dest,
const std::string &  key,
std::string *  value 
) const

Look up a destination data tuple in the store, return true if found false otherwise.

Definition at line 2175 of file wallet.cpp.

int64_t CWallet::GetImmatureBalance ( ) const

Definition at line 1050 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetImmatureWatchOnlyBalance ( ) const

Definition at line 1095 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 2097 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::GetKeyFromPool ( CPubKey key)

Definition at line 1816 of file wallet.cpp.

Here is the caller graph for this function:

unsigned int CWallet::GetKeyPoolSize ( )
inline

Definition at line 373 of file wallet.h.

Here is the caller graph for this function:

int64_t CWallet::GetOldestKeyPoolTime ( )

Definition at line 1835 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetUnconfirmedBalance ( ) const

Definition at line 1035 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetUnconfirmedWatchOnlyBalance ( ) const

Definition at line 1080 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int CWallet::GetVersion ( )
inline

Definition at line 388 of file wallet.h.

Here is the caller graph for this function:

const CWalletTx * CWallet::GetWalletTx ( const uint256 hash) const

Definition at line 37 of file wallet.cpp.

Here is the caller graph for this function:

int64_t CWallet::GetWatchOnlyBalance ( ) const

Definition at line 1064 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::IncOrderPosNext ( CWalletDB pwalletdb = NULL)

Increment the next transaction order id.

Returns
next transaction order id

Definition at line 475 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::Inventory ( const uint256 hash)
inlinevirtual

Implements CWalletInterface.

Definition at line 363 of file wallet.h.

bool CWallet::IsChange ( const CTxOut txout) const

Definition at line 722 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::IsFromMe ( const CTransaction tx) const
inline

Definition at line 315 of file wallet.h.

bool CWallet::IsLockedCoin ( uint256  hash,
unsigned int  n 
) const

Definition at line 2079 of file wallet.cpp.

Here is the caller graph for this function:

isminetype CWallet::IsMine ( const CTxIn txin) const

Definition at line 691 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

isminetype CWallet::IsMine ( const CTxOut txout) const
inline

Definition at line 291 of file wallet.h.

Here is the call graph for this function:

bool CWallet::IsMine ( const CTransaction tx) const
inline

Definition at line 308 of file wallet.h.

Here is the call graph for this function:

bool CWallet::IsSpent ( const uint256 hash,
unsigned int  n 
) const

Definition at line 357 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::KeepKey ( int64_t  nIndex)

Definition at line 1795 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ListLockedCoins ( std::vector< COutPoint > &  vOutpts)

Definition at line 2087 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::LoadCryptedKey ( const CPubKey vchPubKey,
const std::vector< unsigned char > &  vchCryptedSecret 
)

Definition at line 125 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::LoadCScript ( const CScript redeemScript)

Definition at line 139 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Definition at line 204 of file wallet.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::LoadKeyMetadata ( const CPubKey pubkey,
const CKeyMetadata metadata 
)

Definition at line 115 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::LoadMinVersion ( int  nVersion)
inline

Definition at line 208 of file wallet.h.

Here is the caller graph for this function:

DBErrors CWallet::LoadWallet ( bool &  fFirstRunRet)

Definition at line 1586 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::LoadWatchOnly ( const CScript dest)

Definition at line 180 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::LockCoin ( COutPoint output)

Definition at line 2061 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::MarkDirty ( )

Definition at line 512 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::NewKeyPool ( )

Definition at line 1698 of file wallet.cpp.

Here is the call graph for this function:

CWallet::TxItems CWallet::OrderedTxItems ( std::list< CAccountingEntry > &  acentries,
std::string  strAccount = "" 
)

Get the wallet's activity log.

Returns
multimap of ordered transactions and accounting entries
Warning
Returned pointers are only valid within the scope of passed acentries

Definition at line 487 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::ReacceptWalletTransactions ( )

Definition at line 926 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::RemoveWatchOnly ( const CScript dest)
virtual

Reimplemented from CBasicKeyStore.

Definition at line 166 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ResendWalletTransactions ( )
virtual

Implements CWalletInterface.

Definition at line 970 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ReserveKeyFromKeyPool ( int64_t &  nIndex,
CKeyPool keypool 
)

Definition at line 1753 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ReturnKey ( int64_t  nIndex)

Definition at line 1806 of file wallet.cpp.

int CWallet::ScanForWalletTransactions ( CBlockIndex pindexStart,
bool  fUpdate = false 
)

Definition at line 886 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SelectCoins ( int64_t  nTargetValue,
std::set< std::pair< const CWalletTx *, unsigned int > > &  setCoinsRet,
int64_t &  nValueRet,
const CCoinControl coinControl = NULL 
) const
private

Definition at line 1292 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::SelectCoinsMinConf ( int64_t  nTargetValue,
int  nConfMine,
int  nConfTheirs,
std::vector< COutput vCoins,
std::set< std::pair< const CWalletTx *, unsigned int > > &  setCoinsRet,
int64_t &  nValueRet 
) const

Definition at line 1191 of file wallet.cpp.

Here is the call graph for this function:

string CWallet::SendMoney ( CScript  scriptPubKey,
int64_t  nValue,
CWalletTx wtxNew 
)

Definition at line 1540 of file wallet.cpp.

Here is the call graph for this function:

string CWallet::SendMoneyToDestination ( const CTxDestination address,
int64_t  nValue,
CWalletTx wtxNew 
)

Definition at line 1568 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SetAddressBook ( const CTxDestination address,
const std::string &  strName,
const std::string &  purpose 
)

Definition at line 1638 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::SetBestChain ( const CBlockLocator loc)
virtual

Implements CWalletInterface.

Definition at line 251 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SetDefaultKey ( const CPubKey vchPubKey)

Definition at line 1683 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::SetMaxVersion ( int  nVersion)

Definition at line 284 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::SetMinVersion ( enum WalletFeature  nVersion,
CWalletDB pwalletdbIn = NULL,
bool  fExplicit = false 
)

Definition at line 257 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::SetNull ( )
inline

Definition at line 156 of file wallet.h.

void CWallet::SyncMetaData ( std::pair< TxSpends::iterator, TxSpends::iterator >  )
private

Definition at line 319 of file wallet.cpp.

void CWallet::SyncTransaction ( const uint256 hash,
const CTransaction tx,
const CBlock pblock 
)
virtual

Implements CWalletInterface.

Definition at line 662 of file wallet.cpp.

bool CWallet::TopUpKeyPool ( unsigned int  kpSize = 0)

Definition at line 1722 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::Unlock ( const SecureString strWalletPassphrase)

Definition at line 185 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::UnlockAllCoins ( )

Definition at line 2073 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::UnlockCoin ( COutPoint output)

Definition at line 2067 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::UpdatedTransaction ( const uint256 hashTx)
virtual

Implements CWalletInterface.

Definition at line 2050 of file wallet.cpp.

DBErrors CWallet::ZapWalletTx ( )

Definition at line 1614 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CCriticalSection CWallet::cs_wallet
mutable

Main wallet lock.

This lock protects all the fields added by CWallet except for: fFileBacked (immutable after instantiation) strWalletFile (immutable after instantiation)

Definition at line 133 of file wallet.h.

bool CWallet::fFileBacked

Definition at line 135 of file wallet.h.

std::map<CTxDestination, CAddressBookData> CWallet::mapAddressBook

Definition at line 174 of file wallet.h.

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

Definition at line 139 of file wallet.h.

MasterKeyMap CWallet::mapMasterKeys

Definition at line 142 of file wallet.h.

std::map<uint256, int> CWallet::mapRequestCount

Definition at line 172 of file wallet.h.

TxSpends CWallet::mapTxSpends
private

Definition at line 121 of file wallet.h.

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

Definition at line 169 of file wallet.h.

int64_t CWallet::nLastResend
private

Definition at line 115 of file wallet.h.

unsigned int CWallet::nMasterKeyMaxID

Definition at line 143 of file wallet.h.

int64_t CWallet::nNextResend
private

Definition at line 114 of file wallet.h.

int64_t CWallet::nOrderPosNext

Definition at line 171 of file wallet.h.

boost::signals2::signal<void (CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, const std::string &purpose, ChangeType status)> CWallet::NotifyAddressBookChanged

Address book entry changed.

Note
called with lock cs_wallet held.

Definition at line 399 of file wallet.h.

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

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

Watch-only address added.

Definition at line 411 of file wallet.h.

int64_t CWallet::nTimeFirstKey

Definition at line 180 of file wallet.h.

int CWallet::nWalletMaxVersion
private

Definition at line 112 of file wallet.h.

int CWallet::nWalletVersion
private

Definition at line 109 of file wallet.h.

CWalletDB* CWallet::pwalletdbEncryption
private

Definition at line 106 of file wallet.h.

std::set<int64_t> CWallet::setKeyPool

Definition at line 138 of file wallet.h.

std::set<COutPoint> CWallet::setLockedCoins

Definition at line 178 of file wallet.h.

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

Show progress e.g.

for rescan

Definition at line 408 of file wallet.h.

std::string CWallet::strWalletFile

Definition at line 136 of file wallet.h.

CPubKey CWallet::vchDefaultKey

Definition at line 176 of file wallet.h.


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