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
74d015bd
Commit
74d015bd
authored
Feb 04, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor importer package with trickle and balanced dag generation
parent
7a150b00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
test/utils.go
test/utils.go
+4
-3
No files found.
mock
.go
→
test/utils
.go
View file @
74d015bd
package
m
erkledag
package
m
dutils
import
(
import
(
"testing"
"testing"
...
@@ -8,13 +8,14 @@ import (
...
@@ -8,13 +8,14 @@ import (
"github.com/jbenet/go-ipfs/blocks/blockstore"
"github.com/jbenet/go-ipfs/blocks/blockstore"
bsrv
"github.com/jbenet/go-ipfs/blockservice"
bsrv
"github.com/jbenet/go-ipfs/blockservice"
"github.com/jbenet/go-ipfs/exchange/offline"
"github.com/jbenet/go-ipfs/exchange/offline"
dag
"github.com/jbenet/go-ipfs/merkledag"
)
)
func
Mock
(
t
testing
.
TB
)
DAGService
{
func
Mock
(
t
testing
.
TB
)
dag
.
DAGService
{
bstore
:=
blockstore
.
NewBlockstore
(
dssync
.
MutexWrap
(
ds
.
NewMapDatastore
()))
bstore
:=
blockstore
.
NewBlockstore
(
dssync
.
MutexWrap
(
ds
.
NewMapDatastore
()))
bserv
,
err
:=
bsrv
.
New
(
bstore
,
offline
.
Exchange
(
bstore
))
bserv
,
err
:=
bsrv
.
New
(
bstore
,
offline
.
Exchange
(
bstore
))
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
return
NewDAGService
(
bserv
)
return
dag
.
NewDAGService
(
bserv
)
}
}
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