Skip to content

Commit e7c1d2f

Browse files
committed
fix: fix slice init length
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
1 parent c1ce6d7 commit e7c1d2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vochain/state/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func CheckDuplicateDelegates(delegates [][]byte, addr *ethcommon.Address) error
5252
}
5353

5454
func printPrettierDelegates(delegates [][]byte) []string {
55-
prettierDelegates := make([]string, len(delegates))
55+
prettierDelegates := make([]string, 0, len(delegates))
5656
for _, delegate := range delegates {
5757
prettierDelegates = append(prettierDelegates, ethcommon.BytesToAddress(delegate).String())
5858
}

0 commit comments

Comments
 (0)