From d831064f6597220f5013000048cdb0d2285d82a8 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 10 Feb 2014 20:22:52 +0100 Subject: Skip the first byte in generating addresses --- ethereum.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethereum.go') diff --git a/ethereum.go b/ethereum.go index 78a22614f..dfb2a955c 100644 --- a/ethereum.go +++ b/ethereum.go @@ -35,7 +35,7 @@ func CreateKeyPair(force bool) { log.Println("Generating new address and keypair") pub, prv := secp256k1.GenerateKeyPair() - addr := ethutil.Sha3Bin(pub)[12:] + addr := ethutil.Sha3Bin(pub[1:])[12:] log.Printf("Your new address is %x\n", addr) @@ -67,7 +67,7 @@ func main() { if r == "n" || r == "y" { break } else { - fmt.Println("Yes or no?", r) + fmt.Printf("Yes or no?", r) } } -- cgit