Respect maxDepth for Orchard notes in GetFilteredNotes

This commit is contained in:
Kris Nuttycombe 2022-03-07 10:06:23 -07:00
parent ced825edec
commit 3b5fc4e583
1 changed files with 3 additions and 2 deletions

View File

@ -6463,8 +6463,9 @@ void CWallet::GetFilteredNotes(
auto wtx = GetWalletTx(noteMeta.GetOutPoint().hash);
if (wtx) {
if (wtx->GetDepthInMainChain() >= minDepth) {
noteMeta.SetConfirmations(wtx->GetDepthInMainChain());
auto confirmations = wtx->GetDepthInMainChain();
if (confirmations >= minDepth && confirmations <= maxDepth) {
noteMeta.SetConfirmations(confirmations);
orchardNotesRet.push_back(noteMeta);
}
} else {