Set number of confirmations for Orchard notes returned by FindSpendableInputs
This commit is contained in:
parent
3b5fc4e583
commit
38f4afa80c
|
@ -2034,13 +2034,15 @@ SpendableInputs CWallet::FindSpendableInputs(
|
|||
std::vector<OrchardNoteMetadata> incomingNotes;
|
||||
orchardWallet.GetFilteredNotes(incomingNotes, ivk, true, true);
|
||||
|
||||
for (const auto& noteMeta : incomingNotes) {
|
||||
for (auto& noteMeta : incomingNotes) {
|
||||
if (IsOrchardSpent(noteMeta.GetOutPoint())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto mit = mapWallet.find(noteMeta.GetOutPoint().hash);
|
||||
if (mit != mapWallet.end() && mit->second.GetDepthInMainChain() >= minDepth) {
|
||||
auto confirmations = mit->second.GetDepthInMainChain();
|
||||
if (mit != mapWallet.end() && confirmations >= minDepth) {
|
||||
noteMeta.SetConfirmations(confirmations);
|
||||
unspent.orchardNoteMetadata.push_back(noteMeta);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue