mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
[txpool] Prevent clogging up the pending sub pool (#494)
* Debug txpool Best * Print Best result * Print * Trace removeMined * Remove mined tx from pending subpool * Remove debug Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
parent
df49481ddc
commit
d7693ce094
@ -613,15 +613,17 @@ func (p *TxPool) Best(n uint16, txs *types.TxsRlp, tx kv.Tx) error {
|
||||
best := p.pending.best
|
||||
j := 0
|
||||
for i := 0; j < int(n) && i < len(best.ms); i++ {
|
||||
if best.ms[i].Tx.Gas >= p.blockGasLimit.Load() {
|
||||
mt := best.ms[i]
|
||||
if mt.Tx.Gas >= p.blockGasLimit.Load() {
|
||||
// Skip transactions with very large gas limit
|
||||
continue
|
||||
}
|
||||
rlpTx, sender, isLocal, err := p.getRlpLocked(tx, best.ms[i].Tx.IDHash[:])
|
||||
rlpTx, sender, isLocal, err := p.getRlpLocked(tx, mt.Tx.IDHash[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(rlpTx) == 0 {
|
||||
p.pending.Remove(mt)
|
||||
continue
|
||||
}
|
||||
txs.Txs[j] = rlpTx
|
||||
|
Loading…
Reference in New Issue
Block a user