Add -zapwallettxes cli/config option, used for wallet recovery

This diagnostic tool removes all "tx" records from the wallet db,
then forces a full rescan, to rebuild "tx" records accurately.
This commit is contained in:
Jeff Garzik
2014-02-14 11:33:07 -05:00
parent 6056c87d25
commit 518f3bdae3
5 changed files with 128 additions and 0 deletions

View File

@@ -122,6 +122,8 @@ public:
DBErrors ReorderTransactions(CWallet*);
DBErrors LoadWallet(CWallet* pwallet);
DBErrors FindWalletTx(CWallet* pwallet, std::vector<uint256>& vTxHash);
DBErrors ZapWalletTx(CWallet* pwallet);
static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys);
static bool Recover(CDBEnv& dbenv, std::string filename);
};