This repository was archived by the owner on Dec 6, 2022. It is now read-only.
Decode blocks correctly #21
Labels
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
Currently if you pass in a Bitcoin block that includes transactions, it will only use the header part to calculate the CID. This is wrong.
The correct behaviour (to match the Go IPLD Bitcoin implementation is to distinguish between
bitcoin-block
(multicodec 0xb0), which is the header only and abitcoin-tx
(multicodec 0xb1).So building the CID of a
bitcoin-block
would then be (as expected by IPLD) to hash the full data, which will then be correct as it only contains the header.The text was updated successfully, but these errors were encountered: