ToABCI does not preallocate

This commit is contained in:
William Banfield
2022-02-23 12:03:39 -05:00
parent 8c62b98dad
commit 52226ce09c

View File

@@ -684,7 +684,7 @@ func (evl EvidenceList) Has(evidence Evidence) bool {
// ToABCI converts the evidence list to a slice of the ABCI protobuf messages
// for use when communicating the evidence to an application.
func (evl EvidenceList) ToABCI() []abci.Evidence {
el := make([]abci.Evidence, 0)
var el []abci.Evidence
for _, e := range evl {
el = append(el, e.ABCI()...)
}