Commit fc13adf1 authored by Eric Myhre's avatar Eric Myhre

Fix rather important typo in multicodec use.

Thanks Hannah!
Signed-off-by: default avatarEric Myhre <hash@exultant.us>
parent adc089c2
......@@ -74,9 +74,9 @@ func (lb LinkBuilder) Build(ctx context.Context, lnkCtx ipld.LinkContext, node i
return nil, err
}
// Marshal, teeing into the storage writer and the hasher.
mcEncoder, exists := multicodecEncodeTable[lb.Prefix.MhType]
mcEncoder, exists := multicodecEncodeTable[lb.Prefix.Codec]
if !exists {
return nil, fmt.Errorf("no encoder registered for multicodec %d", lb.Prefix.MhType)
return nil, fmt.Errorf("no encoder registered for multicodec %d", lb.Prefix.Codec)
}
var hasher bytes.Buffer // multihash-via-cid only exports bulk use, which is... really inefficient and should be fixed.
w = io.MultiWriter(&hasher, w)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment