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.
1 parent 7cbf934 commit 18faa25Copy full SHA for 18faa25
core/txpool/txpool.go
@@ -486,6 +486,8 @@ func (p *TxPool) Sync() error {
486
487
// Clear removes all tracked txs from the subpools.
488
func (p *TxPool) Clear() {
489
+ // Invoke Sync to ensure that txs pending addition don't get added to the pool after
490
+ // the subpools are subsequently cleared
491
p.Sync()
492
for _, subpool := range p.subpools {
493
subpool.Clear()
0 commit comments