|
|
@ -517,7 +517,7 @@ func (consensus *Consensus) commitBlock(blk *types.Block, committedMsg *FBFTMess |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
atomic.AddUint64(&consensus.blockNum, 1) |
|
|
|
atomic.AddUint64(&consensus.blockNum, 1) |
|
|
|
consensus.SetCurBlockViewID(committedMsg.ViewID + 1) |
|
|
|
consensus.SetViewIDs(committedMsg.ViewID + 1) |
|
|
|
consensus.LeaderPubKey = committedMsg.SenderPubkeys[0] |
|
|
|
consensus.LeaderPubKey = committedMsg.SenderPubkeys[0] |
|
|
|
// Update consensus keys at last so the change of leader status doesn't mess up normal flow
|
|
|
|
// Update consensus keys at last so the change of leader status doesn't mess up normal flow
|
|
|
|
if blk.IsLastBlockInEpoch() { |
|
|
|
if blk.IsLastBlockInEpoch() { |
|
|
|