Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
walletdb.h
Go to the documentation of this file.
120 explicit WalletBatch(WalletDatabase& database, const char* pszMode = "r+", bool _fFlushOnClose = true) :
137 bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey, const CKeyMetadata &keyMeta);
138 bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret, const CKeyMetadata &keyMeta);
167 bool WriteDestData(const std::string &address, const std::string &key, const std::string &value);
172 void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
179 static bool Recover(const fs::path& wallet_path, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue), std::string& out_backup_filename);
180 /* Recover convenience-function to bypass the key filter callback, called when verify fails, recovers everything */
182 /* Recover filter (used as callback), will only let keys (cryptographical keys) as KV/key-type pass through */
189 static bool VerifyDatabaseFile(const fs::path& wallet_path, std::string& warningStr, std::string& errorStr);
bool WriteName(const std::string &strAddress, const std::string &strName)
Definition: walletdb.cpp:29
bool EraseDestData(const std::string &address, const std::string &key)
Erase destination data tuple from wallet database.
Definition: walletdb.cpp:872
bool ErasePurpose(const std::string &strAddress)
Definition: walletdb.cpp:46
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
Definition: block.h:127
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
Definition: walletdb.cpp:76
bool WriteHDPubKey(const CHDPubKey &hdPubKey, const CKeyMetadata &keyMeta)
Definition: walletdb.cpp:892
Definition: walletdb.h:59
Definition: walletdb.h:53
bool WriteIC(const K &key, const T &value, bool fOverwrite=true)
Definition: walletdb.h:100
DBErrors FindWalletTx(std::vector< uint256 > &vTxHash, std::vector< CWalletTx > &vWtx)
Definition: walletdb.cpp:675
DBErrors ZapSelectTx(std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut)
Definition: walletdb.cpp:734
bool WriteHDChain(const CHDChain &chain)
write the hdchain model (external chain child index counter)
Definition: walletdb.cpp:877
Private key encryption is done based on a CMasterKey, which holds a salt and random encryption key...
Definition: crypter.h:34
bool WriteWatchOnly(const CScript &script, const CKeyMetadata &keymeta)
Definition: walletdb.cpp:102
bool Write(const K &key, const T &value, bool fOverwrite=true)
Definition: db.h:233
Definition: walletdb.h:52
static bool VerifyDatabaseFile(const fs::path &wallet_path, std::string &warningStr, std::string &errorStr)
Definition: walletdb.cpp:862
void ListAccountCreditDebit(const std::string &strAccount, std::list< CAccountingEntry > &acentries)
Definition: walletdb.cpp:193
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
DBErrors ZapWalletTx(std::vector< CWalletTx > &vWtx)
Definition: walletdb.cpp:772
WalletBatch(WalletDatabase &database, const char *pszMode="r+", bool _fFlushOnClose=true)
Definition: walletdb.h:120
static bool Recover(const fs::path &wallet_path, void *callbackDataIn, bool(*recoverKVcallback)(void *callbackData, CDataStream ssKey, CDataStream ssValue), std::string &out_backup_filename)
Definition: walletdb.cpp:822
Definition: walletdb.h:54
bool ReadAccount(const std::string &strAccount, CAccount &account)
Definition: walletdb.cpp:155
bool WriteBestBlock(const CBlockLocator &locator)
Definition: walletdb.cpp:118
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
secure_allocator is defined in allocators.h CPrivKey is a serialized private key, with all parameters...
Definition: key.h:24
Definition: walletdb.h:55
bool WriteDestData(const std::string &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
Definition: walletdb.cpp:867
bool WriteCScript(const uint160 &hash, const CScript &redeemScript)
Definition: walletdb.cpp:97
static bool VerifyEnvironment(const fs::path &wallet_path, std::string &errorStr)
Definition: walletdb.cpp:857
void MaybeCompactWalletDB()
Compacts BDB state so that wallet.dat is self-contained (if there are changes)
Definition: walletdb.cpp:789
bool WriteMasterKey(unsigned int nID, const CMasterKey &kMasterKey)
Definition: walletdb.cpp:92
bool WriteOrderPosNext(int64_t nOrderPosNext)
Definition: walletdb.cpp:130
bool WritePrivateSendSalt(const uint256 &salt)
Definition: walletdb.cpp:176
CAmount GetAccountCreditDebit(const std::string &strAccount)
Definition: walletdb.cpp:181
bool WriteAccount(const std::string &strAccount, const CAccount &account)
Definition: walletdb.cpp:161
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:280
Definition: walletdb.h:56
bool WritePool(int64_t nPool, const CKeyPool &keypool)
Definition: walletdb.cpp:140
Definition: hdchain.h:28
Definition: walletdb.h:51
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:715
bool WritePurpose(const std::string &strAddress, const std::string &purpose)
Definition: walletdb.cpp:41
void SerializationOp(Stream &s, Operation ser_action)
Definition: walletdb.h:79
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)
Definition: walletdb.cpp:61
bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry &acentry)
This writes directly to the database, and will not update the CWallet's cached accounting entries! Us...
Definition: walletdb.cpp:166
Definition: hdchain.h:122
static bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDataStream ssValue)
Definition: walletdb.cpp:834
WalletBatch & operator=(const WalletBatch &)=delete
bool WriteCryptedHDChain(const CHDChain &chain)
Definition: walletdb.cpp:882