Add wallet method to clear the note witness cache

This commit is contained in:
Jack Grigg
2016-09-27 14:55:05 +13:00
parent e81c2de753
commit 76b226586e
3 changed files with 53 additions and 0 deletions
+11
View File
@@ -592,6 +592,17 @@ void CWallet::AddToSpends(const uint256& wtxid)
}
}
void CWallet::ClearNoteWitnessCache()
{
LOCK(cs_wallet);
for (std::pair<const uint256, CWalletTx>& wtxItem : mapWallet) {
for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) {
CNoteData* nd = &(item.second);
nd->witnesses.clear();
}
}
}
void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
const CBlock* pblockIn,
ZCIncrementalMerkleTree tree)