From 1c9f75d47c14118bfce60f0a0f7f3fe7a2e7c26a Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sat, 17 Jan 2026 21:25:43 +0800 Subject: [PATCH] consensus: using make slice instead of bytes.Repeat --- consensus/clique/clique.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index a6f02c8c2b..200a10ca03 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -545,7 +545,7 @@ func (c *Clique) Prepare(chain consensus.ChainHeaderReader, header *types.Header // Ensure the extra data has all its components if len(header.Extra) < extraVanity { - header.Extra = append(header.Extra, bytes.Repeat([]byte{0x00}, extraVanity-len(header.Extra))...) + header.Extra = append(header.Extra, make([]byte, extraVanity-len(header.Extra))...) } header.Extra = header.Extra[:extraVanity]