mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-12 14:51:13 +00:00
rename to buildLastCommitInfo
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user