rename to buildLastCommitInfo

This commit is contained in:
William Banfield
2022-02-14 17:46:22 -05:00
parent 6729e25ca1
commit 77bb345c08

View File

@@ -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.