From 1c0e872b6e68f4a9813419483f08eddd9a794ab2 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 5 Oct 2020 09:51:16 +0000 Subject: [PATCH] [viewchange] init bitmap before init payload Signed-off-by: Leo Chen --- consensus/view_change.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consensus/view_change.go b/consensus/view_change.go index 4c4a1c48d..821cbe552 100644 --- a/consensus/view_change.go +++ b/consensus/view_change.go @@ -138,6 +138,9 @@ func (consensus *Consensus) startViewChange(viewID uint64) { consensus.consensusTimeout[timeoutViewChange].SetDuration(duration) defer consensus.consensusTimeout[timeoutViewChange].Start() + // update the dictionary key if the viewID is first time received + consensus.vc.AddViewIDKeyIfNotExist(viewID, consensus.Decider.Participants()) + // init my own payload if err := consensus.vc.InitPayload( consensus.FBFTLog,