Unverified Commit d50e9d24 authored by jacksoom's avatar jacksoom Committed by GitHub

consensus/ethash: remove unnecessary variable definition (#22512)

parent 345890a5
...@@ -537,7 +537,6 @@ func NewShared() *Ethash { ...@@ -537,7 +537,6 @@ func NewShared() *Ethash {
// Close closes the exit channel to notify all backend threads exiting. // Close closes the exit channel to notify all backend threads exiting.
func (ethash *Ethash) Close() error { func (ethash *Ethash) Close() error {
var err error
ethash.closeOnce.Do(func() { ethash.closeOnce.Do(func() {
// Short circuit if the exit channel is not allocated. // Short circuit if the exit channel is not allocated.
if ethash.remote == nil { if ethash.remote == nil {
...@@ -546,7 +545,7 @@ func (ethash *Ethash) Close() error { ...@@ -546,7 +545,7 @@ func (ethash *Ethash) Close() error {
close(ethash.remote.requestExit) close(ethash.remote.requestExit)
<-ethash.remote.exitCh <-ethash.remote.exitCh
}) })
return err return nil
} }
// cache tries to retrieve a verification cache for the specified block number // cache tries to retrieve a verification cache for the specified block number
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment