Reset hash rate to 0 when mining is stopped

pull/308/head
obscuren 10 years ago
parent 6a7b0ef904
commit 4d49d7b5a6
  1. 3
      pow/ezp/pow.go

@ -42,6 +42,8 @@ func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) []byte {
starti := i
start := time.Now().UnixNano()
defer func() { pow.HashRate = 0 }()
// Make sure stop is empty
empty:
for {
@ -55,7 +57,6 @@ empty:
for {
select {
case <-stop:
pow.HashRate = 0
return nil
default:
i++

Loading…
Cancel
Save