Skip to content

Commit

Permalink
Fix the 'checksum' function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeiwan committed Sep 12, 2017
1 parent c0b4d6d commit 465b85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 465b85d

Please sign in to comment.