![]() |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Access to the wallet database (wallet.dat) More...
#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 | WriteStakingStatus (bool status) |
| bool | ReadStakingStatus () |
| bool | Write2FA (bool status) |
| bool | Read2FA () |
| bool | Write2FASecret (std::string secret) |
| std::string | Read2FASecret () |
| bool | Write2FAPeriod (int period) |
| int | Read2FAPeriod () |
| bool | Write2FALastTime (uint64_t lastTime) |
| uint64_t | Read2FALastTime () |
| bool | WriteScannedBlockHeight (int height) |
| bool | ReadScannedBlockHeight (int &height) |
| bool | WriteReserveAmount (const double &amount) |
| bool | ReadReserveAmount (double &amount) |
| bool | WriteTxPrivateKey (const std::string &outpointKey, const std::string &k) |
| bool | ReadTxPrivateKey (const std::string &outpointKey, std::string &k) |
| bool | WriteKeyImage (const std::string &outpointKey, const CKeyImage &k) |
| bool | ReadKeyImage (const std::string &outpointKey, CKeyImage &k) |
| 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 | WriteMultiSig (const CScript &script) |
| bool | EraseMultiSig (const CScript &script) |
| bool | WriteBestBlock (const CBlockLocator &locator) |
| bool | ReadBestBlock (CBlockLocator &locator) |
| bool | WriteOrderPosNext (int64_t nOrderPosNext) |
| bool | WriteStakeSplitThreshold (uint64_t nStakeSplitThreshold) |
| bool | WriteMultiSend (std::vector< std::pair< std::string, int > > vMultiSend) |
| bool | EraseMultiSend (std::vector< std::pair< std::string, int > > vMultiSend) |
| bool | WriteMSettings (bool fMultiSendStake, bool fMultiSendMasternode, int nLastMultiSendHeight) |
| bool | WriteMSDisabledAddresses (std::vector< std::string > vDisabledAddresses) |
| bool | EraseMSDisabledAddresses (std::vector< std::string > vDisabledAddresses) |
| bool | WriteAutoCombineSettings (bool fEnable, CAmount nCombineThreshold) |
| 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) |
| 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. More... | |
| bool | ReadAccount (const std::string &strAccount, CAccount &account) |
| bool | WriteAccount (const std::string &strAccount, const CAccount &account) |
| bool | WriteAutoConsolidateSettingTime (uint32_t settingTime) |
| uint32_t | ReadAutoConsolidateSettingTime () |
| bool | ReadStealthAccount (const std::string &strAccount, CStealthAccount &account) |
| bool | WriteStealthAccount (const std::string &strAccount, const CStealthAccount &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... | |
| bool | WriteHDChain (const CHDChain &chain) |
| bool | WriteCryptedHDChain (const CHDChain &chain) |
| bool | WriteHDPubKey (const CHDPubKey &hdPubKey, const CKeyMetadata &keyMeta) |
| 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 | AppendStealthAccountList (const std::string &accountName) |
| bool | ReadStealthAccountList (std::string &accountList) |
Public Member Functions inherited from CDB | |
| void | Flush () |
| void | Close () |
| bool | TxnBegin () |
| bool | TxnCommit () |
| bool | TxnAbort () |
| bool | ReadVersion (int &nVersion) |
| bool | WriteVersion (int nVersion) |
Static Public Member Functions | |
| static bool | Compact (CDBEnv &dbenv, const std::string &strFile) |
| static bool | Recover (CDBEnv &dbenv, std::string filename, bool fOnlyKeys) |
| static bool | Recover (CDBEnv &dbenv, std::string filename) |
| static void | IncrementUpdateCounter () |
| static unsigned int | GetUpdateCounter () |
Static Public Member Functions inherited from CDB | |
| 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 | |
Protected Member Functions inherited from CDB | |
| 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) |
Protected Attributes inherited from CDB | |
| Db * | pdb |
| std::string | strFile |
| DbTxn * | activeTxn |
| bool | fReadOnly |
| bool | fFlushOnClose |
Access to the wallet database (wallet.dat)
Definition at line 80 of file walletdb.h.
|
inline |
Definition at line 83 of file walletdb.h.
|
private |
| bool CWalletDB::AppendStealthAccountList | ( | const std::string & | accountName | ) |
Definition at line 33 of file walletdb.cpp.
|
static |
| bool CWalletDB::EraseDestData | ( | const std::string & | address, |
| const std::string & | key | ||
| ) |
Erase destination data tuple from wallet database.
Definition at line 1291 of file walletdb.cpp.
| bool CWalletDB::EraseMSDisabledAddresses | ( | std::vector< std::string > | vDisabledAddresses | ) |
Definition at line 245 of file walletdb.cpp.
| bool CWalletDB::EraseMultiSend | ( | std::vector< std::pair< std::string, int > > | vMultiSend | ) |
| bool CWalletDB::EraseMultiSig | ( | const CScript & | script | ) |
Definition at line 155 of file walletdb.cpp.
| bool CWalletDB::EraseName | ( | const std::string & | strAddress | ) |
| bool CWalletDB::ErasePool | ( | int64_t | nPool | ) |
| bool CWalletDB::ErasePurpose | ( | const std::string & | strAddress | ) |
| bool CWalletDB::EraseTx | ( | uint256 | hash | ) |
| bool CWalletDB::EraseWatchOnly | ( | const CScript & | script | ) |
Definition at line 143 of file walletdb.cpp.
| DBErrors CWalletDB::FindWalletTx | ( | CWallet * | pwallet, |
| std::vector< uint256 > & | vTxHash, | ||
| std::vector< CWalletTx > & | vWtx | ||
| ) |
Definition at line 907 of file walletdb.cpp.
| CAmount CWalletDB::GetAccountCreditDebit | ( | const std::string & | strAccount | ) |
Definition at line 413 of file walletdb.cpp.
|
static |
|
static |
Definition at line 1326 of file walletdb.cpp.
| void CWalletDB::ListAccountCreditDebit | ( | const std::string & | strAccount, |
| std::list< CAccountingEntry > & | acentries | ||
| ) |
Definition at line 425 of file walletdb.cpp.
Definition at line 811 of file walletdb.cpp.
|
private |
| bool CWalletDB::Read2FA | ( | ) |
Definition at line 317 of file walletdb.cpp.
| uint64_t CWalletDB::Read2FALastTime | ( | ) |
Definition at line 354 of file walletdb.cpp.
| int CWalletDB::Read2FAPeriod | ( | ) |
Definition at line 342 of file walletdb.cpp.
| std::string CWalletDB::Read2FASecret | ( | ) |
Definition at line 330 of file walletdb.cpp.
| bool CWalletDB::ReadAccount | ( | const std::string & | strAccount, |
| CAccount & | account | ||
| ) |
Definition at line 362 of file walletdb.cpp.
| uint32_t CWalletDB::ReadAutoConsolidateSettingTime | ( | ) |
Definition at line 373 of file walletdb.cpp.
| bool CWalletDB::ReadBestBlock | ( | CBlockLocator & | locator | ) |
| bool CWalletDB::ReadKeyImage | ( | const std::string & | outpointKey, |
| CKeyImage & | k | ||
| ) |
Definition at line 1285 of file walletdb.cpp.
| bool CWalletDB::ReadPool | ( | int64_t | nPool, |
| CKeyPool & | keypool | ||
| ) |
Definition at line 270 of file walletdb.cpp.
| bool CWalletDB::ReadReserveAmount | ( | double & | amount | ) |
| bool CWalletDB::ReadScannedBlockHeight | ( | int & | height | ) |
Definition at line 308 of file walletdb.cpp.
| bool CWalletDB::ReadStakingStatus | ( | ) |
Definition at line 296 of file walletdb.cpp.
| bool CWalletDB::ReadStealthAccount | ( | const std::string & | strAccount, |
| CStealthAccount & | account | ||
| ) |
Definition at line 388 of file walletdb.cpp.
| bool CWalletDB::ReadStealthAccountList | ( | std::string & | accountList | ) |
Definition at line 46 of file walletdb.cpp.
| bool CWalletDB::ReadTxPrivateKey | ( | const std::string & | outpointKey, |
| std::string & | k | ||
| ) |
Definition at line 1276 of file walletdb.cpp.
|
static |
|
static |
Definition at line 1189 of file walletdb.cpp.
| bool CWalletDB::Write2FA | ( | bool | status | ) |
Definition at line 313 of file walletdb.cpp.
| bool CWalletDB::Write2FALastTime | ( | uint64_t | lastTime | ) |
Definition at line 350 of file walletdb.cpp.
| bool CWalletDB::Write2FAPeriod | ( | int | period | ) |
Definition at line 338 of file walletdb.cpp.
| bool CWalletDB::Write2FASecret | ( | std::string | secret | ) |
Definition at line 326 of file walletdb.cpp.
| bool CWalletDB::WriteAccount | ( | const std::string & | strAccount, |
| const CAccount & | account | ||
| ) |
Definition at line 383 of file walletdb.cpp.
|
private |
Definition at line 403 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 408 of file walletdb.cpp.
| bool CWalletDB::WriteAutoCombineSettings | ( | bool | fEnable, |
| CAmount | nCombineThreshold | ||
| ) |
| bool CWalletDB::WriteAutoConsolidateSettingTime | ( | uint32_t | settingTime | ) |
Definition at line 368 of file walletdb.cpp.
| bool CWalletDB::WriteBestBlock | ( | const CBlockLocator & | locator | ) |
| bool CWalletDB::WriteCryptedHDChain | ( | const CHDChain & | chain | ) |
| bool CWalletDB::WriteCryptedKey | ( | const CPubKey & | vchPubKey, |
| const std::vector< unsigned char > & | vchCryptedSecret, | ||
| const CKeyMetadata & | keyMeta | ||
| ) |
| bool CWalletDB::WriteDefaultKey | ( | const CPubKey & | vchPubKey | ) |
Definition at line 264 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 1265 of file walletdb.cpp.
| bool CWalletDB::WriteHDChain | ( | const CHDChain & | chain | ) |
Definition at line 1297 of file walletdb.cpp.
| bool CWalletDB::WriteHDPubKey | ( | const CHDPubKey & | hdPubKey, |
| const CKeyMetadata & | keyMeta | ||
| ) |
| bool CWalletDB::WriteKey | ( | const CPubKey & | vchPubKey, |
| const CPrivKey & | vchPrivKey, | ||
| const CKeyMetadata & | keyMeta | ||
| ) |
| bool CWalletDB::WriteKeyImage | ( | const std::string & | outpointKey, |
| const CKeyImage & | k | ||
| ) |
Definition at line 1281 of file walletdb.cpp.
| bool CWalletDB::WriteMasterKey | ( | unsigned int | nID, |
| const CMasterKey & | kMasterKey | ||
| ) |
| bool CWalletDB::WriteMinVersion | ( | int | nVersion | ) |
Definition at line 287 of file walletdb.cpp.
| bool CWalletDB::WriteMSDisabledAddresses | ( | std::vector< std::string > | vDisabledAddresses | ) |
Definition at line 234 of file walletdb.cpp.
| bool CWalletDB::WriteMSettings | ( | bool | fMultiSendStake, |
| bool | fMultiSendMasternode, | ||
| int | nLastMultiSendHeight | ||
| ) |
| bool CWalletDB::WriteMultiSend | ( | std::vector< std::pair< std::string, int > > | vMultiSend | ) |
| bool CWalletDB::WriteMultiSig | ( | const CScript & | script | ) |
Definition at line 149 of file walletdb.cpp.
| bool CWalletDB::WriteName | ( | const std::string & | strAddress, |
| const std::string & | strName | ||
| ) |
| bool CWalletDB::WriteOrderPosNext | ( | int64_t | nOrderPosNext | ) |
| bool CWalletDB::WritePool | ( | int64_t | nPool, |
| const CKeyPool & | keypool | ||
| ) |
| bool CWalletDB::WritePurpose | ( | const std::string & | strAddress, |
| const std::string & | purpose | ||
| ) |
Definition at line 64 of file walletdb.cpp.
| bool CWalletDB::WriteReserveAmount | ( | const double & | amount | ) |
| bool CWalletDB::WriteScannedBlockHeight | ( | int | height | ) |
Definition at line 304 of file walletdb.cpp.
| bool CWalletDB::WriteStakeSplitThreshold | ( | uint64_t | nStakeSplitThreshold | ) |
Definition at line 192 of file walletdb.cpp.
| bool CWalletDB::WriteStakingStatus | ( | bool | status | ) |
Definition at line 292 of file walletdb.cpp.
| bool CWalletDB::WriteStealthAccount | ( | const std::string & | strAccount, |
| const CStealthAccount & | account | ||
| ) |
| bool CWalletDB::WriteTxPrivateKey | ( | const std::string & | outpointKey, |
| const std::string & | k | ||
| ) |
| bool CWalletDB::WriteWatchOnly | ( | const CScript & | script | ) |
Definition at line 967 of file walletdb.cpp.
1.8.17