updated ethash

This commit is contained in:
obscuren 2015-04-18 15:14:44 +02:00
parent c39a7b5c0d
commit 525cefa37a
2 changed files with 4 additions and 4 deletions

4
Godeps/Godeps.json generated

@ -22,8 +22,8 @@
}, },
{ {
"ImportPath": "github.com/ethereum/ethash", "ImportPath": "github.com/ethereum/ethash",
"Comment": "v23.1-81-g4039fd0", "Comment": "v23.1-82-g908aad3",
"Rev": "4039fd095084679fb0bf3feae91d02506b5d67aa" "Rev": "908aad345c9fbf3ab9bbb94031dc02d0d90df1b8"
}, },
{ {
"ImportPath": "github.com/ethereum/serpent-go", "ImportPath": "github.com/ethereum/serpent-go",

@ -91,7 +91,7 @@ func makeParamsAndCache(chainManager pow.ChainManager, blockNum uint64) (*Params
return nil, err return nil, err
} }
glog.V(logger.Info).Infoln("Making cache") glog.V(logger.Info).Infof("Making cache for epoch: %d (%v) (%x)\n", paramsAndCache.Epoch, blockNum, seedHash)
start := time.Now() start := time.Now()
C.ethash_mkcache(paramsAndCache.cache, paramsAndCache.params, (*C.ethash_blockhash_t)(unsafe.Pointer(&seedHash[0]))) C.ethash_mkcache(paramsAndCache.cache, paramsAndCache.params, (*C.ethash_blockhash_t)(unsafe.Pointer(&seedHash[0])))
@ -387,7 +387,7 @@ func (pow *Ethash) verify(hash common.Hash, mixDigest common.Hash, difficulty *b
if blockNum/epochLength < pow.paramsAndCache.Epoch { if blockNum/epochLength < pow.paramsAndCache.Epoch {
var err error var err error
// If we can't make the params for some reason, this block is invalid // If we can't make the params for some reason, this block is invalid
pAc, err = makeParamsAndCache(pow.chainManager, blockNum+1) pAc, err = makeParamsAndCache(pow.chainManager, blockNum)
if err != nil { if err != nil {
glog.V(logger.Info).Infoln("big fucking eror", err) glog.V(logger.Info).Infoln("big fucking eror", err)
return false return false