diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-16 04:47:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-16 04:47:59 +0800 |
commit | 0b8f66ed9ef177dc72442dd7ba337c6733e30344 (patch) | |
tree | e49c81bb2d456c9044d250216fd2124c87052836 /Godeps/_workspace | |
parent | 22fa59f131e67f6b8d04a12abbd82652b2c65d21 (diff) | |
download | dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar.gz dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar.bz2 dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar.lz dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar.xz dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.tar.zst dexon-0b8f66ed9ef177dc72442dd7ba337c6733e30344.zip |
updated godep ethash
Diffstat (limited to 'Godeps/_workspace')
-rw-r--r-- | Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go index 6f1302bb8..1f615058d 100644 --- a/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go +++ b/Godeps/_workspace/src/github.com/ethereum/ethash/ethash.go @@ -102,7 +102,9 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params func (pow *Ethash) UpdateCache(force bool) error { pow.cacheMutex.Lock() - thisEpoch := pow.chainManager.CurrentBlock().NumberU64() + defer pow.cacheMutex.Unlock() + + thisEpoch := pow.chainManager.CurrentBlock().NumberU64() / epochLength if force || pow.paramsAndCache.Epoch != thisEpoch { var err error pow.paramsAndCache, err = makeParamsAndCache(pow.chainManager, pow.chainManager.CurrentBlock().NumberU64()) @@ -110,7 +112,7 @@ func (pow *Ethash) UpdateCache(force bool) error { panic(err) } } - pow.cacheMutex.Unlock() + return nil } |