diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-06-12 18:34:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 18:34:26 +0800 |
commit | e3dfd5582026a8744a80d3de407601526b720abb (patch) | |
tree | 3ae9eec6ff477e75c67442552927898f238e4e11 /consensus | |
parent | 80f7c6c2996ad47f70a5070c400b1fd87a20c59c (diff) | |
parent | 2fefe4baa034927af0c815c9f317fefd95972298 (diff) | |
download | dexon-e3dfd5582026a8744a80d3de407601526b720abb.tar.gz dexon-e3dfd5582026a8744a80d3de407601526b720abb.tar.zst dexon-e3dfd5582026a8744a80d3de407601526b720abb.zip |
Merge pull request #14598 from konradkonrad/fix_makedag
consensus/ethash, cmd/geth: Fix `makedag` epoch
Diffstat (limited to 'consensus')
-rw-r--r-- | consensus/ethash/ethash.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/consensus/ethash/ethash.go b/consensus/ethash/ethash.go index 94a9ea332..7067e8643 100644 --- a/consensus/ethash/ethash.go +++ b/consensus/ethash/ethash.go @@ -308,14 +308,14 @@ func (d *dataset) release() { // MakeCache generates a new ethash cache and optionally stores it to disk. func MakeCache(block uint64, dir string) { - c := cache{epoch: block/epochLength + 1} + c := cache{epoch: block / epochLength} c.generate(dir, math.MaxInt32, false) c.release() } // MakeDataset generates a new ethash dataset and optionally stores it to disk. func MakeDataset(block uint64, dir string) { - d := dataset{epoch: block/epochLength + 1} + d := dataset{epoch: block / epochLength} d.generate(dir, math.MaxInt32, false) d.release() } |