From f5051cb0e1822082927ea81dfd44dd219dd5bc01 Mon Sep 17 00:00:00 2001 From: tclemos Date: Tue, 27 Jun 2023 12:54:50 -0300 Subject: [PATCH] remove failed txs from the pool limit check --- pool/pool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pool/pool.go b/pool/pool.go index 51634ada1d..9d3ef6e57c 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -310,7 +310,7 @@ func (p *Pool) validateTx(ctx context.Context, poolTx Transaction) error { // check if sender has reached the limit of transactions in the pool if p.cfg.AccountQueue > 0 { - // txCount, err := p.storage.CountTransactionsByFromAndStatus(ctx, from, TxStatusPending, TxStatusFailed) + // txCount, err := p.storage.CountTransactionsByFromAndStatus(ctx, from, TxStatusPending) // if err != nil { // return err // } @@ -326,7 +326,7 @@ func (p *Pool) validateTx(ctx context.Context, poolTx Transaction) error { // check if the pool is full if p.cfg.GlobalQueue > 0 { - txCount, err := p.storage.CountTransactionsByStatus(ctx, TxStatusPending, TxStatusFailed) + txCount, err := p.storage.CountTransactionsByStatus(ctx, TxStatusPending) if err != nil { return err }