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
bd20a39b
Commit
bd20a39b
authored
Jul 09, 2015
by
Juan Batiz-Benet
Committed by
Jeromy
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed {R,}Lock -> {Pin,GC}Lock
License: MIT Signed-off-by:
Juan Batiz-Benet
<
juan@benet.ai
>
parent
10935680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
merkledag_test.go
merkledag_test.go
+5
-13
No files found.
merkledag_test.go
View file @
bd20a39b
...
...
@@ -300,15 +300,13 @@ func TestCantGet(t *testing.T) {
func
TestFetchGraph
(
t
*
testing
.
T
)
{
var
dservs
[]
DAGService
bsis
:=
bstest
.
Mocks
(
t
,
2
)
bsis
:=
bstest
.
Mocks
(
2
)
for
_
,
bsi
:=
range
bsis
{
dservs
=
append
(
dservs
,
NewDAGService
(
bsi
))
}
read
:=
io
.
LimitReader
(
u
.
NewTimeSeededRand
(),
1024
*
32
)
spl
:=
&
chunk
.
SizeSplitter
{
512
}
root
,
err
:=
imp
.
BuildDagFromReader
(
read
,
dservs
[
0
],
spl
,
nil
)
root
,
err
:=
imp
.
BuildDagFromReader
(
dservs
[
0
],
chunk
.
NewSizeSplitter
(
read
,
512
),
nil
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -319,10 +317,7 @@ func TestFetchGraph(t *testing.T) {
}
// create an offline dagstore and ensure all blocks were fetched
bs
,
err
:=
bserv
.
New
(
bsis
[
1
]
.
Blockstore
,
offline
.
Exchange
(
bsis
[
1
]
.
Blockstore
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
bs
:=
bserv
.
New
(
bsis
[
1
]
.
Blockstore
,
offline
.
Exchange
(
bsis
[
1
]
.
Blockstore
))
offline_ds
:=
NewDAGService
(
bs
)
ks
:=
key
.
NewKeySet
()
...
...
@@ -334,14 +329,11 @@ func TestFetchGraph(t *testing.T) {
}
func
TestEnumerateChildren
(
t
*
testing
.
T
)
{
bsi
:=
bstest
.
Mocks
(
t
,
1
)
bsi
:=
bstest
.
Mocks
(
1
)
ds
:=
NewDAGService
(
bsi
[
0
])
spl
:=
&
chunk
.
SizeSplitter
{
512
}
read
:=
io
.
LimitReader
(
u
.
NewTimeSeededRand
(),
1024
*
1024
)
root
,
err
:=
imp
.
BuildDagFromReader
(
read
,
ds
,
spl
,
nil
)
root
,
err
:=
imp
.
BuildDagFromReader
(
ds
,
chunk
.
NewSizeSplitter
(
read
,
512
),
nil
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
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