deleteSpentFrom = idMapKey.blockHeight;
}
+ std::vector<uint256> txesToErase;
+
for (auto &txidAndWtx : mapWallet)
{
txidAndWtx.second.MarkDirty();
}
if (eraseTx)
{
- EraseFromWallet(txidAndWtx.first);
+ txesToErase.push_back(txidAndWtx.first);
for (auto &checkID : oneTxIDs)
{
}
}
+ for (auto hash : txesToErase)
+ {
+ EraseFromWallet(hash);
+ }
+
// now, we've deleted all transactions that were only in the wallet due to our ability to sign with the ID just removed
// loop through all transactions and remove all IDs found in the remaining transactions from our idsToCheck set after we
// have gone through all wallet transactions, we can delete all IDs remaining in the idsToCheck set