Closed singpolyma closed 4 years ago
:+1:
I encountered the same issue when trying to decode this IPFS hash QmSdDyfTcVXHsqawjWBirhTU2rpPiDEVvPXgxfGeUD7Tqh
multihash_binary_string = Base58.base58_to_binary(ipfs_hash, :bitcoin)
multihash = Multihashes.decode(multihash_binary_string)
The digest has a trailing zero which causes Multihashes.decode
to raise a Multihashes::DigestLengthError
exception.
Thank you! (tests pass, Travis had an issue).
Previously a bytestring of all zeros would result in an exception being raised about the length being wrong, even with a correct length.