From d53d11d8be9cb2c278d95071b4b2c4e7963a14bf Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Mon, 9 May 2022 17:51:12 -0400 Subject: [PATCH] Improve legibility Signed-off-by: Thane Thomson --- internal/state/execution.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/state/execution.go b/internal/state/execution.go index c1e9f1692..7debab8ff 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -107,7 +107,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock( &abci.RequestPrepareProposal{ MaxTxBytes: maxDataBytes, Txs: block.Txs.ToSliceOfBytes(), - LocalLastCommit: buildLastExtendedCommitInfo(lastExtCommit, blockExec.store, state.InitialHeight), + LocalLastCommit: buildExtendedCommitInfo(lastExtCommit, blockExec.store, state.InitialHeight), ByzantineValidators: block.Evidence.ToABCI(), Height: block.Height, Time: block.Time, @@ -414,14 +414,14 @@ func buildLastCommitInfo(block *types.Block, store Store, initialHeight int64) a } } -// 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. +// buildExtendedCommitInfo 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 { +// For heights below the initial height, for which we do not have the required +// data, it returns an empty record. +func buildExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialHeight int64) abci.ExtendedCommitInfo { if ec.Height < initialHeight { // There are no extended commits for heights below the initial height. return abci.ExtendedCommitInfo{} @@ -446,7 +446,7 @@ func buildLastExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialH )) } - vs := make([]abci.ExtendedVoteInfo, ecSize) + votes := make([]abci.ExtendedVoteInfo, ecSize) for i, ecs := range ec.ExtendedSignatures { var ext []byte if ecs.BlockIDFlag == types.BlockIDFlagCommit { @@ -466,7 +466,7 @@ func buildLastExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialH } vpb = types.TM2PB.Validator(val) } - vs[i] = abci.ExtendedVoteInfo{ + votes[i] = abci.ExtendedVoteInfo{ Validator: vpb, SignedLastBlock: ecs.BlockIDFlag != types.BlockIDFlagAbsent, VoteExtension: ext, @@ -474,7 +474,7 @@ func buildLastExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialH } return abci.ExtendedCommitInfo{ Round: ec.Round, - Votes: vs, + Votes: votes, } }