Auto merge of #1444 - str4d:1394-reindex-clear-witness-caches, r=str4d
Clear note witness caches on reindexing This PR also fixes a test that was passing arguments in the wrong order. Closes #1394
This commit is contained in:
@@ -625,6 +625,16 @@ 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) {
|
||||
item.second.witnesses.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
|
||||
const CBlock* pblockIn,
|
||||
ZCIncrementalMerkleTree tree)
|
||||
|
||||
Reference in New Issue
Block a user