updated godep ethash
This commit is contained in:
parent
22fa59f131
commit
0b8f66ed9e
4
Godeps/Godeps.json
generated
4
Godeps/Godeps.json
generated
@ -22,8 +22,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/ethereum/ethash",
|
"ImportPath": "github.com/ethereum/ethash",
|
||||||
"Comment": "v23-11-g5376ec8",
|
"Comment": "v23-12-g149261a",
|
||||||
"Rev": "5376ec8816d6bf787d4fc91a08b4527bc5e1f469"
|
"Rev": "149261a5d7cafc3943cbcf1d370082ec70d81e8b"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/ethereum/serpent-go",
|
"ImportPath": "github.com/ethereum/serpent-go",
|
||||||
|
6
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
6
Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go
generated
vendored
@ -102,7 +102,9 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params
|
|||||||
|
|
||||||
func (pow *Ethash) UpdateCache(force bool) error {
|
func (pow *Ethash) UpdateCache(force bool) error {
|
||||||
pow.cacheMutex.Lock()
|
pow.cacheMutex.Lock()
|
||||||
thisEpoch := pow.chainManager.CurrentBlock().NumberU64()
|
defer pow.cacheMutex.Unlock()
|
||||||
|
|
||||||
|
thisEpoch := pow.chainManager.CurrentBlock().NumberU64() / epochLength
|
||||||
if force || pow.paramsAndCache.Epoch != thisEpoch {
|
if force || pow.paramsAndCache.Epoch != thisEpoch {
|
||||||
var err error
|
var err error
|
||||||
pow.paramsAndCache, err = makeParamsAndCache(pow.chainManager, pow.chainManager.CurrentBlock().NumberU64())
|
pow.paramsAndCache, err = makeParamsAndCache(pow.chainManager, pow.chainManager.CurrentBlock().NumberU64())
|
||||||
@ -110,7 +112,7 @@ func (pow *Ethash) UpdateCache(force bool) error {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pow.cacheMutex.Unlock()
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user