Skip to content

Commit

Permalink
Should check CanTransactionFitInPool() again
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Nov 29, 2019
1 parent e5124ed commit 081dac5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neo/Ledger/Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ private void OnParallelVerified(ParallelVerified parallelVerified)
RelayResultReason reason = RelayResultReason.Succeed;
if (!parallelVerified.VerifyResult)
reason = RelayResultReason.Invalid;
else if (!MemPool.CanTransactionFitInPool(parallelVerified.Transaction))
reason = RelayResultReason.OutOfMemory;
else if (!MemPool.TryAdd(parallelVerified.Transaction.Hash, parallelVerified.Transaction))
reason = RelayResultReason.OutOfMemory;
if (reason == RelayResultReason.Succeed && parallelVerified.ShouldRelay)
Expand Down

0 comments on commit 081dac5

Please sign in to comment.