diff --git a/core/blockchain.go b/core/blockchain.go index 64f20b5840..1d55df9394 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1186,7 +1186,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty stats.usedGas += usedGas stats.report(chain, i, bc.stateCache.TrieDB().Size()) if i == len(chain)-1 { - if (chain[i].NumberU64() % bc.chainConfig.Clique.Epoch) == 0 { + if (bc.chainConfig.Clique != nil) && (chain[i].NumberU64()%bc.chainConfig.Clique.Epoch) == 0 { Checkpoint <- 1 } } diff --git a/miner/worker.go b/miner/worker.go index 6062affc01..7b106aeb00 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -488,8 +488,7 @@ func (self *worker) commitNewWork() { log.Info("Commit new mining work", "number", work.Block.Number(), "txs", work.tcount, "uncles", len(uncles), "elapsed", common.PrettyDuration(time.Since(tstart))) self.unconfirmed.Shift(work.Block.NumberU64() - 1) } - if (work.Block.NumberU64() % work.config.Clique.Epoch) == 0 { - log.Info("hey checkpoint") + if (work.config.Clique != nil) && (work.Block.NumberU64()%work.config.Clique.Epoch) == 0 { core.Checkpoint <- 1 } self.push(work)