From 6c8431b3e29322a3a7669cecee612d0145f113df Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 23 Nov 2022 18:38:55 -0500 Subject: [PATCH] save last precommits --- consensus/reactor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index ab1bae3f7..4cd891c7c 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -1461,6 +1461,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { psRound := ps.PRS.Round psCatchupCommitRound := ps.PRS.CatchupCommitRound psCatchupCommit := ps.PRS.CatchupCommit + lastPrecommits := ps.PRS.Precommits startTime := tmtime.Now().Add(-1 * time.Duration(msg.SecondsSinceStartTime) * time.Second) ps.PRS.Height = msg.Height @@ -1490,7 +1491,7 @@ func (ps *PeerState) ApplyNewRoundStepMessage(msg *NewRoundStepMessage) { // Shift Precommits to LastCommit. if psHeight+1 == msg.Height && psRound == msg.LastCommitRound { ps.PRS.LastCommitRound = msg.LastCommitRound - ps.PRS.LastCommit = ps.PRS.Precommits + ps.PRS.LastCommit = lastPrecommits } else { ps.PRS.LastCommitRound = msg.LastCommitRound ps.PRS.LastCommit = nil