mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Update ethash godep
This commit is contained in:
parent
773fcd801c
commit
960a2b2d82
2 changed files with 4 additions and 3 deletions
4
Godeps/Godeps.json
generated
4
Godeps/Godeps.json
generated
|
|
@ -17,8 +17,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/ethereum/ethash",
|
"ImportPath": "github.com/ethereum/ethash",
|
||||||
"Comment": "v23.1-206-gec7e3ba",
|
"Comment": "v23.1-207-gac7a2d1",
|
||||||
"Rev": "ec7e3ba99c7236902722b64aa89bc752fc67ba72"
|
"Rev": "ac7a2d1d57e7fd655636496b6df3c517d18e8734"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/howeyc/fsnotify",
|
"ImportPath": "github.com/howeyc/fsnotify",
|
||||||
|
|
|
||||||
3
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
3
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
|
|
@ -18,6 +18,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"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
|
if (i % (1 << 14)) == 0 { // we don't have to update hash rate on every nonce
|
||||||
elapsed := time.Now().UnixNano() - start
|
elapsed := time.Now().UnixNano() - start
|
||||||
hashes := (float64(1e9) / float64(elapsed)) * float64(i-starti)
|
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))
|
ret := C.ethash_full_compute(dag.ptr, hash, C.uint64_t(nonce))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue