good morning!!!!

Skip to content
Snippets Groups Projects
Commit ffca6dfe authored by thumb8432's avatar thumb8432 Committed by Felix Lange
Browse files

core/types: fix typos (#17762)

parent 107f556b
No related branches found
No related tags found
No related merge requests found
...@@ -227,13 +227,13 @@ func recoverPlain(sighash common.Hash, R, S, Vb *big.Int, homestead bool) (commo ...@@ -227,13 +227,13 @@ func recoverPlain(sighash common.Hash, R, S, Vb *big.Int, homestead bool) (commo
if !crypto.ValidateSignatureValues(V, R, S, homestead) { if !crypto.ValidateSignatureValues(V, R, S, homestead) {
return common.Address{}, ErrInvalidSig return common.Address{}, ErrInvalidSig
} }
// encode the snature in uncompressed format // encode the signature in uncompressed format
r, s := R.Bytes(), S.Bytes() r, s := R.Bytes(), S.Bytes()
sig := make([]byte, 65) sig := make([]byte, 65)
copy(sig[32-len(r):32], r) copy(sig[32-len(r):32], r)
copy(sig[64-len(s):64], s) copy(sig[64-len(s):64], s)
sig[64] = V sig[64] = V
// recover the public key from the snature // recover the public key from the signature
pub, err := crypto.Ecrecover(sighash[:], sig) pub, err := crypto.Ecrecover(sighash[:], sig)
if err != nil { if err != nil {
return common.Address{}, err return common.Address{}, err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment