Skip to content

Commit 18faa25

Browse files
dahu33jwasinger
andcommitted
Update core/txpool/txpool.go
Co-authored-by: jwasinger <[email protected]>
1 parent 7cbf934 commit 18faa25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/txpool/txpool.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ func (p *TxPool) Sync() error {
486486

487487
// Clear removes all tracked txs from the subpools.
488488
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
489491
p.Sync()
490492
for _, subpool := range p.subpools {
491493
subpool.Clear()

0 commit comments

Comments
 (0)