From 10d5010b319549df2410f777bc67c2a203f3b60b Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Mon, 4 Apr 2022 09:46:18 +0700 Subject: [PATCH] validate even no senders #409 --- txpool/types.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/txpool/types.go b/txpool/types.go index 0f96c45e0..7ab10cd2e 100644 --- a/txpool/types.go +++ b/txpool/types.go @@ -375,15 +375,16 @@ func (ctx *TxParseContext) ParseTransaction(payload []byte, pos int, slot *TxSlo } //ctx.keccak1.Sum(slot.IdHash[:0]) _, _ = ctx.keccak1.(io.Reader).Read(slot.IDHash[:32]) - if !ctx.withSender { - return p, nil - } if validateHash != nil { if err := validateHash(slot.IDHash[:32]); err != nil { return p, err } } + if !ctx.withSender { + return p, nil + } + // Computing sigHash (hash used to recover sender from the signature) // Write len Prefix to the sighash if sigHashLen < 56 {