From 962fee88fc13a1a34a72cfa84367d2db446e0929 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Thu, 24 Oct 2024 22:46:10 +0800 Subject: [PATCH] fix: fix slice init length --- 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 {