CWallet::GetConflictS: Handle conflicting Orchard spends.
Co-authored by: Kris Nuttycombe <kris@nutty.land>
This commit is contained in:
parent
b21ca34d44
commit
3c0e1d9aa8
|
@ -1476,7 +1476,18 @@ set<uint256> CWallet::GetConflicts(const uint256& txid) const
|
|||
}
|
||||
}
|
||||
|
||||
// TODO ORCHARD; see #5593
|
||||
for (uint32_t i = 0; i < wtx.GetOrchardBundle().GetNumActions(); i++) {
|
||||
OrchardOutPoint op(wtx.GetHash(), i);
|
||||
auto potential_spends = pwalletMain->orchardWallet.GetPotentialSpends(op);
|
||||
|
||||
if (potential_spends.size() <= 1) {
|
||||
continue; // No conflict if zero or one spends
|
||||
}
|
||||
for (const uint256 txid : potential_spends) {
|
||||
// TODO: Take into account transaction expiry; see #5585
|
||||
result.insert(txid);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue