Update cached incremental witnesses when the active block chain tip changes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -810,6 +810,7 @@ public:
|
||||
CAmount GetDebit(const CTransaction& tx, const isminefilter& filter) const;
|
||||
CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const;
|
||||
CAmount GetChange(const CTransaction& tx) const;
|
||||
void ChainTip(const CBlockIndex *pindex, const CBlock *pblock, bool added);
|
||||
void SetBestChain(const CBlockLocator& loc);
|
||||
|
||||
DBErrors LoadWallet(bool& fFirstRunRet);
|
||||
|
||||
Reference in New Issue
Block a user