Skip to content

Commit

Permalink
MemoryPool: consider signers intersection on Conflicts check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AnnaShaleva committed Aug 24, 2023
1 parent ebfc2e3 commit efa8f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Neo/Ledger/MemoryPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ private bool CheckConflicts(Transaction tx, out List<PoolItem> conflictsList)
{
if (_unsortedTransactions.TryGetValue(hash, out PoolItem unsortedTx))
{
if (!tx.Signers.Select(p => p.Account).Contains(unsortedTx.Tx.Sender)) return false;
if (!tx.Signers.Select(p => p.Account).Intersect(unsortedTx.Tx.Signers.Select(p => p.Account)).Any()) return false;
conflictsFeeSum += unsortedTx.Tx.NetworkFee;
conflictsList.Add(unsortedTx);
}
Expand Down

0 comments on commit efa8f57

Please sign in to comment.