X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwalletdb.h;h=fe2b22501cbfa4cd5ee0764b0505b84640fef567;hb=f48c974108866253988f6cf88bad5b83b1a0f0b0;hp=b5b7f02dc8f0b3a90c36393f20d7f600042330f7;hpb=52c85881648d3381c29da10925c06cbd083cc570;p=novacoin.git diff --git a/src/walletdb.h b/src/walletdb.h index b5b7f02..fe2b225 100644 --- a/src/walletdb.h +++ b/src/walletdb.h @@ -6,7 +6,7 @@ #define BITCOIN_WALLETDB_H #include "db.h" -#include "base58.h" +//#include "base58.h" #include "keystore.h" class CKeyPool; @@ -95,6 +95,19 @@ public: return true; } + bool WriteMalleableKey(const CMalleableKeyView& keyView, const CMalleableKey& malleableKey, const CKeyMetadata &keyMeta) + { + nWalletDBUpdated++; + if(!Write(std::make_pair(std::string("malmeta"), keyView.ToString()), keyMeta)) + return false; + + if(!Write(std::make_pair(std::string("malpair"), keyView.ToString()), malleableKey.ToString(), false)) + return false; + + return true; + } + + bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector& vchCryptedSecret, const CKeyMetadata &keyMeta) { nWalletDBUpdated++; @@ -204,6 +217,9 @@ public: DBErrors ReorderTransactions(CWallet*); DBErrors LoadWallet(CWallet* pwallet); + DBErrors FindWalletTx(CWallet* pwallet, std::vector& vTxHash); + DBErrors ZapWalletTx(CWallet* pwallet); + static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys); static bool Recover(CDBEnv& dbenv, std::string filename); };