实现了访问钱包数据库wallet.dat
访问钱包数据库,继承CDB
方法名 | 说明 |
---|---|
CWalletDB(std::string strFilename, const char* pszMode="r+") |
… |
bool WriteName(const std::string& strAddress, const std::string& strName); |
… |
bool EraseName(const std::string& strAddress); |
… |
bool WriteTx(uint256 hash, const CWalletTx& wtx) |
… |
bool EraseTx(uint256 hash) |
… |
bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey) |
… |
bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret, bool fEraseUnencryptedKey = true) |
… |
bool WriteMasterKey(unsigned int nID, const CMasterKey& kMasterKey) |
… |
bool WriteCScript(const uint160& hash, const CScript& redeemScript) |
… |
bool WriteBestBlock(const CBlockLocator& locator) |
… |
bool ReadBestBlock(CBlockLocator& locator) |
… |
bool WriteOrderPosNext(int64 nOrderPosNext) |
… |
bool WriteDefaultKey(const CPubKey& vchPubKey) |
… |
bool ReadPool(int64 nPool, CKeyPool& keypool) |
… |
bool WritePool(int64 nPool, const CKeyPool& keypool) |
… |
bool ErasePool(int64 nPool) |
… |
bool ReadSetting(const std::string& strKey, T& value) |
… |
bool WriteSetting(const std::string& strKey, const T& value) |
… |
bool EraseSetting(const std::string& strKey) |
… |
bool WriteMinVersion(int nVersion) |
… |
bool ReadAccount(const std::string& strAccount, CAccount& account); |
… |
bool WriteAccount(const std::string& strAccount, const CAccount& account); |
… |
bool WriteAccountingEntry(const uint64 nAccEntryNum, const CAccountingEntry& acentry); |
… |
bool WriteAccountingEntry(const CAccountingEntry& acentry); |
… |
int64 GetAccountCreditDebit(const std::string& strAccount); |
… |
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries); |
… |
DBErrors ReorderTransactions(CWallet*); |
… |
DBErrors LoadWallet(CWallet* pwallet); |
… |
static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys); |
… |
static bool Recover(CDBEnv& dbenv, std::string filename); |
… |