diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-05-15 19:24:26 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-05-25 12:59:29 -0400 |
commit | b426c7764d26e280e1f814cf36e050743c45cd12 (patch) | |
tree | 0291aa49cb78fefc8f5428e3f3fd4d662795d79c /src/wallet/walletdb.h | |
parent | 2741774214168eb287c7066d6823afe5e570381d (diff) | |
download | bitcoin-b426c7764d26e280e1f814cf36e050743c45cd12.tar.xz |
Make BerkeleyBatch::Recover and WalletBatch::RecoverKeysOnlyFilter standalone
Instead of having these be class static functions, just make them be
standalone. Also removes WalletBatch::Recover which just passed through
to BerkeleyBatch::Recover.
Diffstat (limited to 'src/wallet/walletdb.h')
-rw-r--r-- | src/wallet/walletdb.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 155046dfba..389b96189f 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -263,12 +263,6 @@ public: DBErrors FindWalletTx(std::vector<uint256>& vTxHash, std::list<CWalletTx>& vWtx); DBErrors ZapWalletTx(std::list<CWalletTx>& vWtx); DBErrors ZapSelectTx(std::vector<uint256>& vHashIn, std::vector<uint256>& vHashOut); - /* Try to (very carefully!) recover wallet database (with a possible key type filter) */ - static bool Recover(const fs::path& wallet_path, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue), std::string& out_backup_filename); - /* Recover convenience-function to bypass the key filter callback, called when verify fails, recovers everything */ - static bool Recover(const fs::path& wallet_path, std::string& out_backup_filename); - /* Recover filter (used as callback), will only let keys (cryptographical keys) as KV/key-type pass through */ - static bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDataStream ssValue); /* Function to determine if a certain KV/key-type is a key (cryptographical key) type */ static bool IsKeyType(const std::string& strType); /* verifies the database environment */ @@ -297,4 +291,7 @@ void MaybeCompactWalletDB(); //! Unserialize a given Key-Value pair and load it into the wallet bool ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, std::string& strType, std::string& strErr); +/* Recover filter (used as callback), will only let keys (cryptographical keys) as KV/key-type pass through */ +bool RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDataStream ssValue); + #endif // BITCOIN_WALLET_WALLETDB_H |