Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ld
go-ld-prime
Commits
fc13adf1
Commit
fc13adf1
authored
Mar 18, 2019
by
Eric Myhre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rather important typo in multicodec use.
Thanks Hannah! Signed-off-by:
Eric Myhre
<
hash@exultant.us
>
parent
adc089c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
linking/cid/cidLink.go
linking/cid/cidLink.go
+2
-2
No files found.
linking/cid/cidLink.go
View file @
fc13adf1
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment