From 67572e55acf7733d273a8685da58def567658e23 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Thu, 24 Oct 2024 22:47:24 +0800 Subject: [PATCH] fix: fix slice init length --- 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()) }