1
0
Fork 0
forked from forks/go-ethereum

Update core/txpool/txpool.go

Co-authored-by: jwasinger <j-wasinger@hotmail.com>
This commit is contained in:
Pierre R 2025-03-11 18:26:16 +09:00 committed by Pierre Rousset
parent 7cbf934488
commit 18faa251b3

View file

@ -486,6 +486,8 @@ func (p *TxPool) Sync() error {
// Clear removes all tracked txs from the subpools.
func (p *TxPool) Clear() {
// Invoke Sync to ensure that txs pending addition don't get added to the pool after
// the subpools are subsequently cleared
p.Sync()
for _, subpool := range p.subpools {
subpool.Clear()