File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1717package txpool
1818
1919import (
20- "fmt "
20+ "errors "
2121 "math/big"
2222
2323 "github.com/ethereum/go-ethereum/common"
@@ -88,20 +88,13 @@ func (p *TxPool) Close() error {
8888 // Terminate the reset loop and wait for it to finish
8989 errc := make (chan error )
9090 p .quit <- errc
91- if err := <- errc ; err != nil {
92- errs = append (errs , err )
93- }
91+ errs = append (errs , <- errc )
9492
9593 // Terminate each subpool
9694 for _ , subpool := range p .subpools {
97- if err := subpool .Close (); err != nil {
98- errs = append (errs , err )
99- }
95+ errs = append (errs , subpool .Close ())
10096 }
101- if len (errs ) > 0 {
102- return fmt .Errorf ("subpool close errors: %v" , errs )
103- }
104- return nil
97+ return errors .Join (errs ... )
10598}
10699
107100// loop is the transaction pool's main event loop, waiting for and reacting to
You can’t perform that action at this time.
0 commit comments