Skip to content

Commit

Permalink
remove failed txs from the pool limit check (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
tclemos authored Jun 28, 2023
1 parent b5518aa commit 247a8a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
// }
Expand All @@ -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
}
Expand Down

0 comments on commit 247a8a2

Please sign in to comment.