We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6143c35 + 18faa25 commit cc273ceCopy full SHA for cc273ce
core/txpool/txpool.go
@@ -556,6 +556,9 @@ func (p *TxPool) Sync() error {
556
557
// Clear removes all tracked txs from the subpools.
558
func (p *TxPool) Clear() {
559
+ // Invoke Sync to ensure that txs pending addition don't get added to the pool after
560
+ // the subpools are subsequently cleared
561
+ p.Sync()
562
for _, subpool := range p.subpools {
563
subpool.Clear()
564
}
0 commit comments