From 4d49d7b5a64774990c55dc2046195985bd716259 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 13 Feb 2015 18:30:06 +0100 Subject: Reset hash rate to 0 when mining is stopped --- pow/ezp/pow.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pow/ezp') diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go index 5571e73cd..f4a8b80e5 100644 --- a/pow/ezp/pow.go +++ b/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++ -- cgit v1.2.3