mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
reset yielded state in txpool (#777)
This commit is contained in:
parent
d70b55bc1a
commit
aa99053b78
@ -675,6 +675,15 @@ func (p *TxPool) best(n uint16, txs *types.TxsRlp, tx kv.Tx, onTopOf, availableG
|
|||||||
return success, err
|
return success, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *TxPool) ResetYieldedStatus() {
|
||||||
|
p.lock.Lock()
|
||||||
|
defer p.lock.Unlock()
|
||||||
|
best := p.pending.best
|
||||||
|
for i := 0; i < len(best.ms); i++ {
|
||||||
|
best.ms[i].alreadyYielded = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (p *TxPool) YieldBest(n uint16, txs *types.TxsRlp, tx kv.Tx, onTopOf, availableGas uint64) (bool, error) {
|
func (p *TxPool) YieldBest(n uint16, txs *types.TxsRlp, tx kv.Tx, onTopOf, availableGas uint64) (bool, error) {
|
||||||
return p.best(n, txs, tx, onTopOf, availableGas, true)
|
return p.best(n, txs, tx, onTopOf, availableGas, true)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user