mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "core/txpool: remove use of errors.Join function (#27523)"
This reverts commit f4ea07641a.
This commit is contained in:
parent
51b8c3f946
commit
2ea2fce6b8
1 changed files with 4 additions and 11 deletions
|
|
@ -17,7 +17,7 @@
|
||||||
package txpool
|
package txpool
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
@ -88,20 +88,13 @@ func (p *TxPool) Close() error {
|
||||||
// Terminate the reset loop and wait for it to finish
|
// Terminate the reset loop and wait for it to finish
|
||||||
errc := make(chan error)
|
errc := make(chan error)
|
||||||
p.quit <- errc
|
p.quit <- errc
|
||||||
if err := <-errc; err != nil {
|
errs = append(errs, <-errc)
|
||||||
errs = append(errs, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Terminate each subpool
|
// Terminate each subpool
|
||||||
for _, subpool := range p.subpools {
|
for _, subpool := range p.subpools {
|
||||||
if err := subpool.Close(); err != nil {
|
errs = append(errs, subpool.Close())
|
||||||
errs = append(errs, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if len(errs) > 0 {
|
return errors.Join(errs...)
|
||||||
return fmt.Errorf("subpool close errors: %v", errs)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop is the transaction pool's main event loop, waiting for and reacting to
|
// loop is the transaction pool's main event loop, waiting for and reacting to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue