Do not make block produce information with the first decentralization block.
TODO
- If block is produced by goloop, skip the first 2 decentralization blocks
@@ -168,11 +168,18 @@ func handleConsensusInfo(cc contract.CallContext) error {
return nil
}
term := es.State.GetTerm()
- if term.Sequence() == 0 && cc.BlockHeight() < term.StartHeight() + 2 {
- // Ignore the first two starting decentralization blocks
- log.Tracef("Ignore the first two starting decentralization blocks")
+ if term.Sequence() == 0 {
+ skipCount := int64(1)
+ // TODO implement consensusByGoloop
+ //if consensusByGoloop {
+ // skipCount := int64(2)
+ //}
+ if cc.BlockHeight() < term.StartHeight()+skipCount {
+ // Ignore the first N decentralization blocks
+ log.Tracef("BlockProduce: Skip the first %d decentralization blocks", skipCount)
return nil
}
+ }
// if PrepManager is not ready, it returns immediately
if es.pm.GetPRepByNode(csi.Proposer()) == nil {
return nil
