aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/salvage.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-05-15 19:37:55 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-05-25 12:59:29 -0400
commit9ea2d258b46e8a9776100633585ed0feede5c2a4 (patch)
tree9a43aee82423a3629108f1c5a237d221dd820292 /src/wallet/salvage.h
parentb426c7764d26e280e1f814cf36e050743c45cd12 (diff)
downloadbitcoin-9ea2d258b46e8a9776100633585ed0feede5c2a4.tar.xz
Move RecoverDatabaseFile and RecoverKeysOnlyFilter into salvage.{cpp/h}
Diffstat (limited to 'src/wallet/salvage.h')
-rw-r--r--src/wallet/salvage.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/salvage.h b/src/wallet/salvage.h
new file mode 100644
index 0000000000..e501c54456
--- /dev/null
+++ b/src/wallet/salvage.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2020 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_WALLET_SALVAGE_H
+#define BITCOIN_WALLET_SALVAGE_H
+
+#include <fs.h>
+#include <streams.h>
+
+bool RecoverDatabaseFile(const fs::path& file_path, void *callbackDataIn, bool (*recoverKVcallback)(void* callbackData, CDataStream ssKey, CDataStream ssValue), std::string& out_backup_filename);
+
+/* 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_SALVAGE_H