mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
format the msg parameter to Ecrecover so it has 32 bytes
This commit is contained in:
parent
9f2d6ee3fc
commit
0cbeb26f93
1 changed files with 2 additions and 1 deletions
|
|
@ -59,7 +59,8 @@ func handleRequest(conn net.Conn) {
|
|||
// and the bytes array of the signature
|
||||
var msg = []byte(dat["msg"].(string))
|
||||
var sig = []byte(dat["sig"].(string))
|
||||
var address, err = crypto.Ecrecover(msg, sig)
|
||||
new_msg := crypto.Keccak256(msg)
|
||||
var address, err = crypto.Ecrecover(new_msg, sig)
|
||||
if err != nil {
|
||||
fmt.Println("The error is ")
|
||||
fmt.Println(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue