in progress.

pull/4351/head
frozen 2 years ago committed by Casey Gardiner
parent 8965371482
commit 4d7e167bee
  1. 2
      consensus/consensus_v2.go

@ -689,7 +689,7 @@ func (consensus *Consensus) commitBlock(blk *types.Block, committedMsg *FBFTMess
// SetupForNewConsensus sets the state for new consensus
func (consensus *Consensus) SetupForNewConsensus(blk *types.Block, committedMsg *FBFTMessage) {
atomic.StoreUint64(&consensus.blockNum, blk.NumberU64()+1)
curBlockViewID := consensus.SetCurBlockViewID(committedMsg.ViewID + 1) // first view id is going to be 2.
curBlockViewID := consensus.SetCurBlockViewID(committedMsg.ViewID + 1)
prev := consensus.GetLeaderPubKey()
idx := consensus.SetLeaderIndex(func(i int) int {
if curBlockViewID%3 == 0 {

Loading…
Cancel
Save