Skip to content

Commit efa8f57

Browse files
committed
MemoryPool: consider signers intersection on Conflicts check
This patch should be a part of fd1748d, but was accidentally skipped. This patch matches exactly the NeoGo behaviour that was added in nspcc-dev/neo-go#3061 and that was discussed earlier in neo-project#2818 (comment). Fix the issue described in neo-project#2818 (comment). Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
1 parent ebfc2e3 commit efa8f57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Neo/Ledger/MemoryPool.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ private bool CheckConflicts(Transaction tx, out List<PoolItem> conflictsList)
369369
{
370370
if (_unsortedTransactions.TryGetValue(hash, out PoolItem unsortedTx))
371371
{
372-
if (!tx.Signers.Select(p => p.Account).Contains(unsortedTx.Tx.Sender)) return false;
372+
if (!tx.Signers.Select(p => p.Account).Intersect(unsortedTx.Tx.Signers.Select(p => p.Account)).Any()) return false;
373373
conflictsFeeSum += unsortedTx.Tx.NetworkFee;
374374
conflictsList.Add(unsortedTx);
375375
}

0 commit comments

Comments
 (0)