X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwalletdb.h;h=fe2b22501cbfa4cd5ee0764b0505b84640fef567;hb=9c9ba366ebc85b0d8eef6d962a9fa84cffe0cae7;hp=1739693061db888e2ade0941ac7b50f3830c8b00;hpb=b032c4a33e27deebe9210347048998ecc4624ee4;p=novacoin.git diff --git a/src/walletdb.h b/src/walletdb.h index 1739693..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++; @@ -188,25 +201,6 @@ public: return Erase(std::make_pair(std::string("pool"), nPool)); } - // Settings are no longer stored in wallet.dat; these are - // used only for backwards compatibility: - template - bool ReadSetting(const std::string& strKey, T& value) - { - return Read(std::make_pair(std::string("setting"), strKey), value); - } - template - bool WriteSetting(const std::string& strKey, const T& value) - { - nWalletDBUpdated++; - return Write(std::make_pair(std::string("setting"), strKey), value); - } - bool EraseSetting(const std::string& strKey) - { - nWalletDBUpdated++; - return Erase(std::make_pair(std::string("setting"), strKey)); - } - bool WriteMinVersion(int nVersion) { return Write(std::string("minversion"), nVersion); @@ -223,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); };