You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the data should be hashed twice before extracting the checksum.
Also, hash256 isn't part of hashlib library, I used sha256.
I suppose if hash256 is a custom double sha256 function, then nothing to see here, move along folks.
I'm getting the right answer for the test with this code:
On page 83 (chapter 4 under "Address Format", there is this code:
def encode_base58_checksum(b):
return encode_base58(b + hash256(b)[:4])
I believe the data should be hashed twice before extracting the checksum.
Also, hash256 isn't part of hashlib library, I used sha256.
I suppose if hash256 is a custom double sha256 function, then nothing to see here, move along folks.
I'm getting the right answer for the test with this code:
def base58check_encode(b):
checksum = hashlib.sha256(hashlib.sha256(b).digest()).digest()[:4]
return base58.b58encode(b + checksum)
The text was updated successfully, but these errors were encountered: