Skip to content

Commit d50e9d2

Browse files
authored
consensus/ethash: remove unnecessary variable definition (#22512)
1 parent 345890a commit d50e9d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

consensus/ethash/ethash.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ func NewShared() *Ethash {
537537

538538
// Close closes the exit channel to notify all backend threads exiting.
539539
func (ethash *Ethash) Close() error {
540-
var err error
541540
ethash.closeOnce.Do(func() {
542541
// Short circuit if the exit channel is not allocated.
543542
if ethash.remote == nil {
@@ -546,7 +545,7 @@ func (ethash *Ethash) Close() error {
546545
close(ethash.remote.requestExit)
547546
<-ethash.remote.exitCh
548547
})
549-
return err
548+
return nil
550549
}
551550

552551
// cache tries to retrieve a verification cache for the specified block number

0 commit comments

Comments
 (0)