![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <walletdb.h>
Public Member Functions | |
CWalletDB (const std::string &strFilename, const char *pszMode="r+", bool fFlushOnClose=true) | |
bool | WriteName (const std::string &strAddress, const std::string &strName) |
bool | EraseName (const std::string &strAddress) |
bool | WritePurpose (const std::string &strAddress, const std::string &purpose) |
bool | ErasePurpose (const std::string &strAddress) |
bool | WriteTx (uint256 hash, const CWalletTx &wtx) |
bool | EraseTx (uint256 hash) |
bool | WriteKey (const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta) |
bool | WriteCryptedKey (const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta) |
bool | WriteMasterKey (unsigned int nID, const CMasterKey &kMasterKey) |
bool | WriteCScript (const uint160 &hash, const CScript &redeemScript) |
bool | WriteWatchOnly (const CScript &script) |
bool | EraseWatchOnly (const CScript &script) |
bool | WriteBestBlock (const CBlockLocator &locator) |
bool | ReadBestBlock (CBlockLocator &locator) |
bool | WriteOrderPosNext (int64_t nOrderPosNext) |
bool | WriteDefaultKey (const CPubKey &vchPubKey) |
bool | ReadPool (int64_t nPool, CKeyPool &keypool) |
bool | WritePool (int64_t nPool, const CKeyPool &keypool) |
bool | ErasePool (int64_t nPool) |
bool | WriteMinVersion (int nVersion) |
bool | WriteAccountingEntry_Backend (const CAccountingEntry &acentry) |
bool | ReadAccount (const std::string &strAccount, CAccount &account) |
bool | WriteAccount (const std::string &strAccount, const CAccount &account) |
bool | WriteDestData (const std::string &address, const std::string &key, const std::string &value) |
Write destination data key,value tuple to database. More... | |
bool | EraseDestData (const std::string &address, const std::string &key) |
Erase destination data tuple from wallet database. More... | |
CAmount | GetAccountCreditDebit (const std::string &strAccount) |
void | ListAccountCreditDebit (const std::string &strAccount, std::list< CAccountingEntry > &acentries) |
DBErrors | ReorderTransactions (CWallet *pwallet) |
DBErrors | LoadWallet (CWallet *pwallet) |
DBErrors | FindWalletTx (CWallet *pwallet, std::vector< uint256 > &vTxHash, std::vector< CWalletTx > &vWtx) |
DBErrors | ZapWalletTx (CWallet *pwallet, std::vector< CWalletTx > &vWtx) |
bool | WriteHDChain (const CHDChain &chain) |
write the hdchain model (external chain child index counter) More... | |
bool | WriteCryptedHDChain (const CHDChain &chain) |
bool | WriteHDPubKey (const CHDPubKey &hdPubKey, const CKeyMetadata &keyMeta) |
![]() | |
void | Flush () |
void | Close () |
bool | TxnBegin () |
bool | TxnCommit () |
bool | TxnAbort () |
bool | ReadVersion (int &nVersion) |
bool | WriteVersion (int nVersion) |
Static Public Member Functions | |
static bool | Recover (CDBEnv &dbenv, const std::string &filename, bool fOnlyKeys) |
static bool | Recover (CDBEnv &dbenv, const std::string &filename) |
![]() | |
static bool | Rewrite (const std::string &strFile, const char *pszSkip=NULL) |
Private Member Functions | |
CWalletDB (const CWalletDB &) | |
void | operator= (const CWalletDB &) |
bool | WriteAccountingEntry (const uint64_t nAccEntryNum, const CAccountingEntry &acentry) |
Additional Inherited Members | |
![]() | |
CDB (const std::string &strFilename, const char *pszMode="r+", bool fFlushOnCloseIn=true) | |
~CDB () | |
template<typename K , typename T > | |
bool | Read (const K &key, T &value) |
template<typename K , typename T > | |
bool | Write (const K &key, const T &value, bool fOverwrite=true) |
template<typename K > | |
bool | Erase (const K &key) |
template<typename K > | |
bool | Exists (const K &key) |
Dbc * | GetCursor () |
int | ReadAtCursor (Dbc *pcursor, CDataStream &ssKey, CDataStream &ssValue, unsigned int fFlags=DB_NEXT) |
![]() | |
Db * | pdb |
std::string | strFile |
DbTxn * | activeTxn |
bool | fReadOnly |
bool | fFlushOnClose |
Access to the wallet database (wallet.dat)
Definition at line 78 of file walletdb.h.
|
inline |
Definition at line 81 of file walletdb.h.
|
private |
bool CWalletDB::EraseDestData | ( | const std::string & | address, |
const std::string & | key | ||
) |
Erase destination data tuple from wallet database.
Definition at line 1158 of file walletdb.cpp.
Referenced by CWallet::DelAddressBook(), and CWallet::EraseDestData().
bool CWalletDB::EraseName | ( | const std::string & | strAddress | ) |
Definition at line 38 of file walletdb.cpp.
Referenced by CWallet::DelAddressBook().
bool CWalletDB::ErasePool | ( | int64_t | nPool | ) |
Definition at line 168 of file walletdb.cpp.
Referenced by CWallet::KeepKey(), and CWallet::NewKeyPool().
bool CWalletDB::ErasePurpose | ( | const std::string & | strAddress | ) |
Definition at line 52 of file walletdb.cpp.
Referenced by CWallet::DelAddressBook().
bool CWalletDB::EraseTx | ( | uint256 | hash | ) |
Definition at line 64 of file walletdb.cpp.
bool CWalletDB::EraseWatchOnly | ( | const CScript & | script | ) |
Definition at line 126 of file walletdb.cpp.
DBErrors CWalletDB::FindWalletTx | ( | CWallet * | pwallet, |
std::vector< uint256 > & | vTxHash, | ||
std::vector< CWalletTx > & | vWtx | ||
) |
Definition at line 759 of file walletdb.cpp.
CAmount CWalletDB::GetAccountCreditDebit | ( | const std::string & | strAccount | ) |
Definition at line 200 of file walletdb.cpp.
Referenced by GetAccountBalance().
void CWalletDB::ListAccountCreditDebit | ( | const std::string & | strAccount, |
std::list< CAccountingEntry > & | acentries | ||
) |
Definition at line 212 of file walletdb.cpp.
Definition at line 648 of file walletdb.cpp.
Referenced by CWallet::LoadWallet().
|
private |
bool CWalletDB::ReadAccount | ( | const std::string & | strAccount, |
CAccount & | account | ||
) |
Definition at line 179 of file walletdb.cpp.
Referenced by GetAccountAddress().
bool CWalletDB::ReadBestBlock | ( | CBlockLocator & | locator | ) |
Definition at line 139 of file walletdb.cpp.
Referenced by AppInit2().
bool CWalletDB::ReadPool | ( | int64_t | nPool, |
CKeyPool & | keypool | ||
) |
Definition at line 157 of file walletdb.cpp.
Referenced by GetOldestKeyInPool(), LoadReserveKeysToSet(), and CWallet::ReserveKeyFromKeyPool().
|
static |
Definition at line 1066 of file walletdb.cpp.
Referenced by Recover(), and CWallet::Verify().
|
static |
Definition at line 1147 of file walletdb.cpp.
Definition at line 255 of file walletdb.cpp.
bool CWalletDB::WriteAccount | ( | const std::string & | strAccount, |
const CAccount & | account | ||
) |
Definition at line 185 of file walletdb.cpp.
Referenced by GetAccountAddress().
|
private |
Definition at line 190 of file walletdb.cpp.
bool CWalletDB::WriteAccountingEntry_Backend | ( | const CAccountingEntry & | acentry | ) |
This writes directly to the database, and will not update the CWallet's cached accounting entries! Use wallet.AddAccountingEntry instead, to write and update its caches.
Definition at line 195 of file walletdb.cpp.
Referenced by CWallet::AddAccountingEntry().
bool CWalletDB::WriteBestBlock | ( | const CBlockLocator & | locator | ) |
Definition at line 132 of file walletdb.cpp.
Referenced by CWallet::SetBestChain().
bool CWalletDB::WriteCryptedHDChain | ( | const CHDChain & | chain | ) |
Definition at line 1170 of file walletdb.cpp.
Referenced by CWallet::SetCryptedHDChain().
bool CWalletDB::WriteCryptedKey | ( | const CPubKey & | vchPubKey, |
const std::vector< unsigned char > & | vchCryptedSecret, | ||
const CKeyMetadata & | keyMeta | ||
) |
Definition at line 87 of file walletdb.cpp.
Referenced by CWallet::AddCryptedKey().
Definition at line 114 of file walletdb.cpp.
Referenced by CWallet::AddCScript().
bool CWalletDB::WriteDefaultKey | ( | const CPubKey & | vchPubKey | ) |
Definition at line 151 of file walletdb.cpp.
bool CWalletDB::WriteDestData | ( | const std::string & | address, |
const std::string & | key, | ||
const std::string & | value | ||
) |
Write destination data key,value tuple to database.
Definition at line 1152 of file walletdb.cpp.
Referenced by CWallet::AddDestData().
bool CWalletDB::WriteHDChain | ( | const CHDChain & | chain | ) |
write the hdchain model (external chain child index counter)
Definition at line 1164 of file walletdb.cpp.
bool CWalletDB::WriteHDPubKey | ( | const CHDPubKey & | hdPubKey, |
const CKeyMetadata & | keyMeta | ||
) |
Definition at line 1182 of file walletdb.cpp.
Referenced by CWallet::AddHDPubKey().
bool CWalletDB::WriteKey | ( | const CPubKey & | vchPubKey, |
const CPrivKey & | vchPrivKey, | ||
const CKeyMetadata & | keyMeta | ||
) |
Definition at line 70 of file walletdb.cpp.
Referenced by CWallet::AddKeyPubKey().
bool CWalletDB::WriteMasterKey | ( | unsigned int | nID, |
const CMasterKey & | kMasterKey | ||
) |
Definition at line 108 of file walletdb.cpp.
Referenced by CWallet::ChangeWalletPassphrase().
bool CWalletDB::WriteMinVersion | ( | int | nVersion | ) |
Definition at line 174 of file walletdb.cpp.
Referenced by CWallet::SetMinVersion().
bool CWalletDB::WriteName | ( | const std::string & | strAddress, |
const std::string & | strName | ||
) |
Definition at line 32 of file walletdb.cpp.
Referenced by CWallet::SetAddressBook().
bool CWalletDB::WriteOrderPosNext | ( | int64_t | nOrderPosNext | ) |
Definition at line 145 of file walletdb.cpp.
Referenced by CWallet::IncOrderPosNext().
bool CWalletDB::WritePool | ( | int64_t | nPool, |
const CKeyPool & | keypool | ||
) |
Definition at line 162 of file walletdb.cpp.
Referenced by CWallet::TopUpKeyPool().
bool CWalletDB::WritePurpose | ( | const std::string & | strAddress, |
const std::string & | purpose | ||
) |
Definition at line 46 of file walletdb.cpp.
Referenced by CWallet::SetAddressBook().
Definition at line 58 of file walletdb.cpp.
Referenced by CWalletTx::WriteToDisk().
bool CWalletDB::WriteWatchOnly | ( | const CScript & | script | ) |
Definition at line 120 of file walletdb.cpp.
Referenced by CWallet::AddWatchOnly().
Definition at line 825 of file walletdb.cpp.
Referenced by CWallet::ZapWalletTx().