6 #ifndef BITCOIN_WALLET_WALLETDB_H 7 #define BITCOIN_WALLET_WALLETDB_H 63 template <
typename Stream,
typename Operation>
85 bool WriteName(
const std::string& strAddress,
const std::string& strName);
86 bool EraseName(
const std::string& strAddress);
88 bool WritePurpose(
const std::string& strAddress,
const std::string& purpose);
123 bool WriteDestData(
const std::string &address,
const std::string &
key,
const std::string &value);
134 static bool Recover(
CDBEnv& dbenv,
const std::string& filename,
bool fOnlyKeys);
135 static bool Recover(
CDBEnv& dbenv,
const std::string& filename);
154 #endif // BITCOIN_WALLET_WALLETDB_H bool ErasePurpose(const std::string &strAddress)
bool WriteCScript(const uint160 &hash, const CScript &redeemScript)
bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry &acentry)
bool AutoBackupWallet(CWallet *wallet, std::string strWalletFile, std::string &strBackupWarning, std::string &strBackupError)
bool BackupWallet(const CWallet &wallet, const std::string &strDest)
bool WriteDestData(const std::string &address, const std::string &key, const std::string &value)
Write destination data key,value tuple to database.
bool WriteHDPubKey(const CHDPubKey &hdPubKey, const CKeyMetadata &keyMeta)
DBErrors ZapWalletTx(CWallet *pwallet, std::vector< CWalletTx > &vWtx)
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
bool EraseTx(uint256 hash)
bool WriteOrderPosNext(int64_t nOrderPosNext)
bool ReadBestBlock(CBlockLocator &locator)
CWalletDB(const std::string &strFilename, const char *pszMode="r+", bool fFlushOnClose=true)
bool WriteHDChain(const CHDChain &chain)
write the hdchain model (external chain child index counter)
DBErrors FindWalletTx(CWallet *pwallet, std::vector< uint256 > &vTxHash, std::vector< CWalletTx > &vWtx)
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
DBErrors LoadWallet(CWallet *pwallet)
void ListAccountCreditDebit(const std::string &strAccount, std::list< CAccountingEntry > &acentries)
bool ReadAccount(const std::string &strAccount, CAccount &account)
bool WritePool(int64_t nPool, const CKeyPool &keypool)
void operator=(const CWalletDB &)
bool WriteCryptedHDChain(const CHDChain &chain)
bool WriteBestBlock(const CBlockLocator &locator)
static bool Recover(CDBEnv &dbenv, const std::string &filename, bool fOnlyKeys)
bool WriteTx(uint256 hash, const CWalletTx &wtx)
bool WriteMasterKey(unsigned int nID, const CMasterKey &kMasterKey)
bool WriteName(const std::string &strAddress, const std::string &strName)
bool WriteKey(const CPubKey &vchPubKey, const CPrivKey &vchPrivKey, const CKeyMetadata &keyMeta)
bool EraseWatchOnly(const CScript &script)
bool ErasePool(int64_t nPool)
bool WriteMinVersion(int nVersion)
bool WriteDefaultKey(const CPubKey &vchPubKey)
bool WriteAccountingEntry_Backend(const CAccountingEntry &acentry)
DBErrors ReorderTransactions(CWallet *pwallet)
void ThreadFlushWalletDB(const std::string &strFile)
bool EraseName(const std::string &strAddress)
CAmount GetAccountCreditDebit(const std::string &strAccount)
static const bool DEFAULT_FLUSHWALLET
bool ReadPool(int64_t nPool, CKeyPool &keypool)
bool WriteAccount(const std::string &strAccount, const CAccount &account)
bool WriteWatchOnly(const CScript &script)
bool EraseDestData(const std::string &address, const std::string &key)
Erase destination data tuple from wallet database.
bool WritePurpose(const std::string &strAddress, const std::string &purpose)