Fix the 'checksum' function

This commit is contained in:
Ivan Kuznetsov 2017-09-12 20:57:19 +07:00
parent c0b4d6d107
commit 465b85d5f2
1 changed files with 1 additions and 1 deletions

View File

@ -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) {