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
dms3
go-cid
Commits
08e15f8a
Commit
08e15f8a
authored
Dec 02, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: avoid re-validated already validated CIDs
parent
58b483a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
builder.go
builder.go
+1
-1
cid.go
cid.go
+1
-1
No files found.
builder.go
View file @
08e15f8a
...
...
@@ -38,7 +38,7 @@ func (p V0Builder) Sum(data []byte) (Cid, error) {
if
err
!=
nil
{
return
Undef
,
err
}
return
NewCidV0
(
hash
),
nil
return
Cid
{
string
(
hash
)
}
,
nil
}
func
(
p
V0Builder
)
GetCodec
()
uint64
{
...
...
cid.go
View file @
08e15f8a
...
...
@@ -613,7 +613,7 @@ func CidFromBytes(data []byte) (int, Cid, error) {
return
0
,
Undef
,
err
}
return
34
,
NewCidV0
(
h
),
nil
return
34
,
Cid
{
string
(
h
)
}
,
nil
}
vers
,
n
:=
binary
.
Uvarint
(
data
)
...
...
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