mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
Update core/txpool/txpool.go
Co-authored-by: jwasinger <j-wasinger@hotmail.com>
This commit is contained in:
parent
7cbf934488
commit
18faa251b3
1 changed files with 2 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue