From e7c1d2fe1b616af9eb38233066c6e2e907531189 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Thu, 7 Nov 2024 18:04:17 +0800 Subject: [PATCH] fix: fix slice init length Signed-off-by: wangjingcun --- vochain/state/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vochain/state/utils.go b/vochain/state/utils.go index bdc9a73c6..79bfebcce 100644 --- a/vochain/state/utils.go +++ b/vochain/state/utils.go @@ -52,7 +52,7 @@ func CheckDuplicateDelegates(delegates [][]byte, addr *ethcommon.Address) error } func printPrettierDelegates(delegates [][]byte) []string { - prettierDelegates := make([]string, len(delegates)) + prettierDelegates := make([]string, 0, len(delegates)) for _, delegate := range delegates { prettierDelegates = append(prettierDelegates, ethcommon.BytesToAddress(delegate).String()) }