diff --git a/consensus/ethash/ethash.go b/consensus/ethash/ethash.go index 78892e1da85d..a012d0a583a9 100644 --- a/consensus/ethash/ethash.go +++ b/consensus/ethash/ethash.go @@ -223,7 +223,7 @@ func (c *cache) generate(dir string, limit int, test bool) { size = 1024 } // If we don't store anything on disk, generate and return. - if dir == "" { + if dir == "" || limit <= 0 { c.cache = make([]uint32, size/4) generateCache(c.cache, c.epoch, seed) return @@ -305,7 +305,7 @@ func (d *dataset) generate(dir string, limit int, test bool) { dsize = 32 * 1024 } // If we don't store anything on disk, generate and return - if dir == "" { + if dir == "" || limit <= 0 { cache := make([]uint32, csize/4) generateCache(cache, d.epoch, seed) diff --git a/consensus/ethash/sealer.go b/consensus/ethash/sealer.go index 43db1fcb7fd7..b313d35061b9 100644 --- a/consensus/ethash/sealer.go +++ b/consensus/ethash/sealer.go @@ -269,7 +269,7 @@ func (ethash *Ethash) remote(notify []string, noverify bool) { start := time.Now() if !noverify { - if err := ethash.verifySeal(nil, header, true); err != nil { + if err := ethash.verifySeal(nil, header, false); err != nil { log.Warn("Invalid proof-of-work submitted", "sealhash", sealhash, "elapsed", common.PrettyDuration(time.Since(start)), "err", err) return false }