From 74cbac4e8f9ff7fe092e2128a3f26ee733b2daaa Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Tue, 19 Sep 2017 14:53:53 +0700 Subject: [PATCH] Revert "Fix the 'checksum' function" This reverts commit 465b85d5f28b6264d23ae225adc2ab53ab34d045. --- wallet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet.go b/wallet.go index 262a366..31a2258 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[len(secondSHA)-addressChecksumLen:] + return secondSHA[:addressChecksumLen] } func newKeyPair() (ecdsa.PrivateKey, []byte) {