From 465b85d5f28b6264d23ae225adc2ab53ab34d045 Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Tue, 12 Sep 2017 20:57:19 +0700 Subject: [PATCH] Fix the 'checksum' function --- wallet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet.go b/wallet.go index 31a22583..262a3665 100644 --- a/wallet.go +++ b/wallet.go @@ -72,7 +72,7 @@ func checksum(payload []byte) []byte { firstSHA := sha256.Sum256(payload) secondSHA := sha256.Sum256(firstSHA[:]) - return secondSHA[:addressChecksumLen] + return secondSHA[len(secondSHA)-addressChecksumLen:] } func newKeyPair() (ecdsa.PrivateKey, []byte) {