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-merkledag
Commits
90a5c15f
Commit
90a5c15f
authored
Feb 27, 2018
by
Hector Sanjuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merkledag_test.go: Handle short reads in makeTestDAG
License: MIT Signed-off-by:
Hector Sanjuan
<
hector@protocol.ai
>
parent
1bcb27fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
merkledag_test.go
merkledag_test.go
+4
-1
No files found.
merkledag_test.go
View file @
90a5c15f
...
...
@@ -134,7 +134,10 @@ func makeTestDAG(t *testing.T, read io.Reader, ds ipld.DAGService) ipld.Node {
p
:=
make
([]
byte
,
512
)
nodes
:=
[]
*
ProtoNode
{}
var
err
error
_
,
err
=
io
.
ReadFull
(
read
,
p
)
n
,
err
=
io
.
ReadFull
(
read
,
p
)
if
n
!=
len
(
p
)
{
t
.
Fatal
(
"should have read 512 bytes from the reader"
)
}
for
err
==
nil
{
protoNode
:=
NodeWithData
(
p
)
nodes
=
append
(
nodes
,
protoNode
)
...
...
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