Skip to content

Commit

Permalink
Update emitter.go
Browse files Browse the repository at this point in the history
Do not block nodes from taking events from mempool
  • Loading branch information
jacklevin74 authored Jan 30, 2024
1 parent 525cdc1 commit dc41314
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gossip/emitter/emitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ func (em *Emitter) getSortedTxs() *types.TransactionsByPriceAndNonce {
em.Log.Error("Tx pool transactions fetching error", "err", err)
return nil
}
for from, txs := range pendingTxs {
//Do not block nodes from taking events from mempool
//for from, txs := range pendingTxs {
// Filter the excessive transactions from each sender
if len(txs) > em.config.MaxTxsPerAddress {
pendingTxs[from] = txs[:em.config.MaxTxsPerAddress]
}
}
// if len(txs) > em.config.MaxTxsPerAddress {
// pendingTxs[from] = txs[:em.config.MaxTxsPerAddress]
// }
//}
sortedTxs := types.NewTransactionsByPriceAndNonce(em.world.TxSigner, pendingTxs, em.world.GetRules().Economy.MinGasPrice)
em.cache.sortedTxs = sortedTxs
em.cache.poolCount = poolCount
Expand Down

0 comments on commit dc41314

Please sign in to comment.