aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-04-18 13:11:28 -0400
committerJohn Newbery <john@johnnewbery.com>2018-05-16 11:55:38 -0400
commite0e90db07b4e798dd1625bd23c2e9bd96fc6ff49 (patch)
treeedc9d049cfbfc3b33f39ed1193db8765151fed74 /src/wallet/wallet.h
parent470316c3bf5ca343d5d66b94839169a4572eceb7 (diff)
downloadbitcoin-e0e90db07b4e798dd1625bd23c2e9bd96fc6ff49.tar.xz
[wallet] Add CWallet::Verify function
This allows a single wallet to be verified. Prior to this commit, all wallets were verified together by the WalletInit::Verify() function at start-up. Individual wallet verification will be done when loading wallets dynamically at runtime.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index ebf14d4386..200248bcf5 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -1118,6 +1118,9 @@ public:
/** Mark a transaction as replaced by another transaction (e.g., BIP 125). */
bool MarkReplaced(const uint256& originalHash, const uint256& newHash);
+ //! Verify wallet naming and perform salvage on the wallet if required
+ static bool Verify(std::string wallet_file, bool salvage_wallet);
+
/* Initializes the wallet, returns a new CWallet instance or a null pointer in case of an error */
static CWallet* CreateWalletFromFile(const std::string& name, const fs::path& path);