Update cached incremental witnesses when the active block chain tip changes

This commit is contained in:
Jack Grigg
2016-08-24 15:52:43 +12:00
parent be74c80deb
commit 769e031c1a
5 changed files with 21 additions and 0 deletions

View File

@@ -336,6 +336,15 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase,
return false;
}
void CWallet::ChainTip(const CBlockIndex *pindex, const CBlock *pblock, bool added)
{
if (added) {
IncrementNoteWitnesses(pindex, pblock, pcoinsTip);
} else {
DecrementNoteWitnesses();
}
}
void CWallet::SetBestChain(const CBlockLocator& loc)
{
CWalletDB walletdb(strWalletFile);