Auto-rescan wallets on reorg if note witnesses get out of sync

This commit is contained in:
miketout
2018-10-12 18:05:32 -07:00
parent 83a426bc91
commit 47ab0926c4
5 changed files with 47 additions and 8 deletions

View File

@@ -781,6 +781,7 @@ public:
* incremental witness cache in any transaction in mapWallet.
*/
int64_t nWitnessCacheSize;
bool needsRescan = false;
void ClearNoteWitnessCache();
@@ -1120,6 +1121,7 @@ public:
bool AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletDB* pwalletdb);
void EraseFromWallet(const uint256 &hash);
void SyncTransaction(const CTransaction& tx, const CBlock* pblock);
void RescanWallet();
bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate);
void WitnessNoteCommitment(
std::vector<uint256> commitments,