validate even no senders #409

This commit is contained in:
Alex Sharov 2022-04-04 09:46:18 +07:00 committed by GitHub
parent 75b64f01a3
commit 10d5010b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {