wallet: Change IsLockedNote to take a JSOutPoint

This removes the uint64_t -> size_t -> uint64_t round trip, as well as the
JSOutPoint -> parts -> JSOutPoint round trip.
This commit is contained in:
Jack Grigg
2018-05-07 21:56:57 +01:00
parent daed9ba7cc
commit b87e271a9a
3 changed files with 10 additions and 11 deletions

View File

@@ -3464,10 +3464,9 @@ void CWallet::UnlockAllNotes()
setLockedNotes.clear();
}
bool CWallet::IsLockedNote(uint256 hash, size_t js, uint8_t n) const
bool CWallet::IsLockedNote(JSOutPoint& outpt) const
{
AssertLockHeld(cs_wallet); // setLockedNotes
JSOutPoint outpt(hash, js, n);
return (setLockedNotes.count(outpt) > 0);
}
@@ -3769,7 +3768,7 @@ void CWallet::GetFilteredNotes(
}
// skip locked notes
if (IsLockedNote(jsop.hash, jsop.js, jsop.n)) {
if (IsLockedNote(jsop)) {
continue;
}