mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
consensus: using make slice instead of bytes.Repeat
This commit is contained in:
parent
127d1f42bb
commit
1c9f75d47c
1 changed files with 1 additions and 1 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue