diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0d127ccbd..7d0b7c9a3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -593,6 +593,19 @@ set CWallet::GetConflicts(const uint256& txid) const } } } + + std::pair range_o; + + for (const SpendDescription &spend : wtx.vShieldedSpend) { + uint256 nullifier = spend.nullifier; + if (mapTxSaplingNullifiers.count(nullifier) <= 1) { + continue; // No conflict if zero or one spends + } + range_o = mapTxSaplingNullifiers.equal_range(nullifier); + for (TxNullifiers::const_iterator it = range_o.first; it != range_o.second; ++it) { + result.insert(it->second); + } + } return result; }