mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-19 06:19:27 +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.
|
// Clear removes all tracked txs from the subpools.
|
||||||
func (p *TxPool) Clear() {
|
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()
|
p.Sync()
|
||||||
for _, subpool := range p.subpools {
|
for _, subpool := range p.subpools {
|
||||||
subpool.Clear()
|
subpool.Clear()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue