From 52226ce09ce22cd0347782f1f335686d80a68713 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 23 Feb 2022 12:03:39 -0500 Subject: [PATCH] ToABCI does not preallocate --- types/evidence.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/evidence.go b/types/evidence.go index 562cb0da7..1ea53d9b5 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -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()...) }