diff --git a/internal/state/execution.go b/internal/state/execution.go index 2b5721da1..3cb94b543 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -383,8 +383,6 @@ func execBlockOnProxyApp( dtxs := make([]*abci.ResponseDeliverTx, len(block.Txs)) abciResponses.DeliverTxs = dtxs - commitInfo := buildLastCommitInfo(block, store, initialHeight) - // Begin block var err error pbh := block.Header.ToProto() @@ -397,7 +395,7 @@ func execBlockOnProxyApp( abci.RequestBeginBlock{ Hash: block.Hash(), Header: *pbh, - LastCommitInfo: commitInfo, + LastCommitInfo: buildLastCommitInfo(block, store, initialHeight), ByzantineValidators: block.Evidence.ToABCI(), }, ) diff --git a/types/evidence.go b/types/evidence.go index 825e35a03..a2297fe4e 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -681,6 +681,8 @@ func (evl EvidenceList) Has(evidence Evidence) bool { return false } +// ToABCI converts the evidence list to a list of the equivalent abci proto type +// for use when communicating the evidence to an application. func (evl EvidenceList) ToABCI() []abci.Evidence { el := make([]abci.Evidence, 0) for _, e := range evl {