From 0d6f75f6d1252291903951af827e6dfbf081e069 Mon Sep 17 00:00:00 2001 From: rusttech Date: Fri, 25 Oct 2024 20:53:15 +0800 Subject: [PATCH] fix: fix slice init length (#2345) --- x/ccv/provider/keeper/consumer_equivocation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/ccv/provider/keeper/consumer_equivocation.go b/x/ccv/provider/keeper/consumer_equivocation.go index 0fc95f639b..a7c3d2025e 100644 --- a/x/ccv/provider/keeper/consumer_equivocation.go +++ b/x/ccv/provider/keeper/consumer_equivocation.go @@ -184,7 +184,7 @@ func (k Keeper) HandleConsumerMisbehaviour(ctx sdk.Context, consumerId string, m return err } - provAddrs := make([]types.ProviderConsAddress, len(byzantineValidators)) + provAddrs := make([]types.ProviderConsAddress, 0, len(byzantineValidators)) // slash, jail, and tombstone the Byzantine validators for _, v := range byzantineValidators {