mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
fix unittests
This commit is contained in:
parent
0ae49c74fa
commit
90ceb82c9c
2 changed files with 2 additions and 3 deletions
|
|
@ -1186,7 +1186,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
|
||||||
stats.usedGas += usedGas
|
stats.usedGas += usedGas
|
||||||
stats.report(chain, i, bc.stateCache.TrieDB().Size())
|
stats.report(chain, i, bc.stateCache.TrieDB().Size())
|
||||||
if i == len(chain)-1 {
|
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
|
Checkpoint <- 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)))
|
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)
|
self.unconfirmed.Shift(work.Block.NumberU64() - 1)
|
||||||
}
|
}
|
||||||
if (work.Block.NumberU64() % work.config.Clique.Epoch) == 0 {
|
if (work.config.Clique != nil) && (work.Block.NumberU64()%work.config.Clique.Epoch) == 0 {
|
||||||
log.Info("hey checkpoint")
|
|
||||||
core.Checkpoint <- 1
|
core.Checkpoint <- 1
|
||||||
}
|
}
|
||||||
self.push(work)
|
self.push(work)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue