From 77bb345c08a47ff93acd04ad27010233ba9949aa Mon Sep 17 00:00:00 2001 From: William Banfield Date: Mon, 14 Feb 2022 17:46:22 -0500 Subject: [PATCH] rename to buildLastCommitInfo --- internal/state/execution.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/state/execution.go b/internal/state/execution.go index be5d6ab5c..e22b17db2 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -433,18 +433,20 @@ func execBlockOnProxyApp( return abciResponses, nil } -func getBeginBlockValidatorInfo(block *types.Block, store Store, - initialHeight int64) abci.LastCommitInfo { +func buildLastCommitInfo(block *types.Block, store Store, initialHeight int64) abci.LastCommitInfo { + + if block.Height == initialHeight { + return abci.LastCommitInfo{ + Round: 0, + Votes: make([]abci.VoteInfo, 0), + } + } lci := abci.LastCommitInfo{ Round: block.LastCommit.Round, Votes: make([]abci.VoteInfo, block.LastCommit.Size()), } - if block.Height <= initialHeight { - return lci - } - // Initial block -> LastCommitInfo.Votes are empty. // Remember that the first LastCommit is intentionally empty, so it makes // sense for LastCommitInfo.Votes to also be empty.