mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-30 19:55:42 +00:00
Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
co-authored by
M. J. Fromberger
parent
9483b42f0b
commit
b1896ebca6
@@ -414,11 +414,13 @@ func buildLastCommitInfo(block *types.Block, store Store, initialHeight int64) a
|
||||
}
|
||||
}
|
||||
|
||||
// buildLastExtendedCommitInfo expects an ExtendedCommitInfo, which includes
|
||||
// the original precommit votes along with their vote extensions from the last
|
||||
// commit. It populates the corresponding ABCI protobuf structures using the
|
||||
// validator set obtained from the store at the height of the last extended
|
||||
// commit.
|
||||
// buildLastExtendedCommitInfo populates an ABCI extended commit from the
|
||||
// corresponding Tendermint extended commit ec, using the stored validator set from
|
||||
// ec. It requires ec to include the original precommit votes along
|
||||
// with the vote extensions from the last commit.
|
||||
//
|
||||
// For heights below the initial height, for which we do not have the
|
||||
// required data, it returns an empty record.
|
||||
func buildLastExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialHeight int64) abci.ExtendedCommitInfo {
|
||||
// We assume the current height is ec.Height + 1.
|
||||
if ec.Height < initialHeight {
|
||||
|
||||
@@ -328,11 +328,10 @@ func TestProcessProposal(t *testing.T) {
|
||||
lastCommitSig = append(lastCommitSig, vote.CommitSig())
|
||||
}
|
||||
|
||||
lastCommit := &types.Commit{
|
||||
block1 := sf.MakeBlock(state, height, &types.Commit{
|
||||
Height: height - 1,
|
||||
Signatures: lastCommitSig,
|
||||
}
|
||||
block1 := sf.MakeBlock(state, height, lastCommit)
|
||||
})
|
||||
block1.Txs = txs
|
||||
|
||||
expectedRpp := &abci.RequestProcessProposal{
|
||||
|
||||
Reference in New Issue
Block a user