From ecf5e217bfb27a0f4902e1ecc5009a8833a09b8e Mon Sep 17 00:00:00 2001 From: a Date: Thu, 7 Sep 2023 08:02:54 -0500 Subject: [PATCH] a --- types/txn_decode.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/types/txn_decode.go b/types/txn_decode.go index 549b0622e..2461593f5 100644 --- a/types/txn_decode.go +++ b/types/txn_decode.go @@ -56,7 +56,6 @@ func (ctx *TxParseContext) decodeTransaction(decoder *rlp.Decoder, slot *TxSlot, var ( dec *rlp.Decoder ) - var ( parent *rlp.Decoder // the parent should contain in its underlying buffer the rlp used for txn hash creation sans txn type bodyDecoder *rlp.Decoder // the bodyDecoder should be an rlp decoder primed at the top of the list body for txn @@ -381,14 +380,14 @@ func (ctx *TxParseContext) decodeTransactionBody(dec *rlp.Decoder, parent *rlp.D if sigHashLen < 56 { ctx.buf[0] = byte(sigHashLen) + 192 if _, err := k2.Write(ctx.buf[:1]); err != nil { - return fmt.Errorf("computing signHash (hashing len Prefix): %s", err) //nolint + return fmt.Errorf("computing signHash (hashing len Prefix1): %s", err) //nolint } } else { beLen := common.BitLenToByteLen(bits.Len(sigHashLen)) binary.BigEndian.PutUint64(ctx.buf[1:], uint64(sigHashLen)) ctx.buf[8-beLen] = byte(beLen) + 247 if _, err := k2.Write(ctx.buf[8-beLen : 9]); err != nil { - return fmt.Errorf("computing signHash (hashing len Prefix): %s", err) //nolint + return fmt.Errorf("computing signHash (hashing len Prefix2): %s", err) //nolint } } if _, err = k2.Write(dec.Underlying()[sigHashPos:sigHashEnd]); err != nil {