diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 22da157861..9a4a5d3013 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -17,8 +17,8 @@ }, { "ImportPath": "github.com/ethereum/ethash", - "Comment": "v23.1-206-gec7e3ba", - "Rev": "ec7e3ba99c7236902722b64aa89bc752fc67ba72" + "Comment": "v23.1-207-gac7a2d1", + "Rev": "ac7a2d1d57e7fd655636496b6df3c517d18e8734" }, { "ImportPath": "github.com/howeyc/fsnotify", diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index 6c4d33095b..2d0c024c9d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -18,6 +18,7 @@ import ( "path/filepath" "runtime" "sync" + "sync/atomic" "time" "unsafe" @@ -280,7 +281,7 @@ func (pow *Full) Search(block pow.Block, stop <-chan struct{}, prevHashRate *uin if (i % (1 << 14)) == 0 { // we don't have to update hash rate on every nonce elapsed := time.Now().UnixNano() - start hashes := (float64(1e9) / float64(elapsed)) * float64(i-starti) - *prevHashRate = uint64(hashes) + atomic.StoreUint64(prevHashRate, uint64(hashes)) } ret := C.ethash_full_compute(dag.ptr, hash, C.uint64_t(nonce))