diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index 9a32126a80..3b5dedb3dc 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -313,7 +313,7 @@ var opCodeToString = [256]string{ COINBASE: "COINBASE", TIMESTAMP: "TIMESTAMP", NUMBER: "NUMBER", - DIFFICULTY: "DIFFICULTY", // TODO (MariusVanDerWijden) rename to PREVRANDAO post merge + DIFFICULTY: "DIFFICULTY", GASLIMIT: "GASLIMIT", CHAINID: "CHAINID", SELFBALANCE: "SELFBALANCE", diff --git a/crypto/signify/signify.go b/crypto/signify/signify.go index eb029e5099..8bfb31c3ab 100644 --- a/crypto/signify/signify.go +++ b/crypto/signify/signify.go @@ -79,19 +79,19 @@ func SignFile(input string, output string, key string, untrustedComment string, // Create the main data signature. rawSig := ed25519.Sign(skey, filedata) - var dataSig []byte + dataSig := make([]byte, 0, len(header)+len(keyNum)+len(rawSig)) dataSig = append(dataSig, header...) dataSig = append(dataSig, keyNum...) dataSig = append(dataSig, rawSig...) // Create the comment signature. - var commentSigInput []byte + commentSigInput := make([]byte, 0, len(rawSig)+len(trustedComment)) commentSigInput = append(commentSigInput, rawSig...) commentSigInput = append(commentSigInput, []byte(trustedComment)...) commentSig := ed25519.Sign(skey, commentSigInput) // Create the output file. - var out = new(bytes.Buffer) + out := new(bytes.Buffer) fmt.Fprintln(out, "untrusted comment:", untrustedComment) fmt.Fprintln(out, base64.StdEncoding.EncodeToString(dataSig)) fmt.Fprintln(out, "trusted comment:", trustedComment) diff --git a/log/format.go b/log/format.go index e7dd8a4099..c0f7c1a7c1 100644 --- a/log/format.go +++ b/log/format.go @@ -67,7 +67,6 @@ func (h *TerminalHandler) format(buf []byte, r slog.Record, usecolor bool) []byt b.WriteString(msg) // try to justify the log output for short messages - //length := utf8.RuneCountInString(msg) length := len(msg) if (r.NumAttrs()+len(h.attrs)) > 0 && length < termMsgJust { b.Write(spaces[:termMsgJust-length])