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-unixfs
Commits
401b8f41
Commit
401b8f41
authored
Jan 10, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: move initialization sqaush
parent
efb75ee5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
test/epictest/core.go
test/epictest/core.go
+7
-6
No files found.
test/epictest/core.go
View file @
401b8f41
...
...
@@ -42,12 +42,6 @@ func makeCore(ctx context.Context, rf RepoFactory) (*Core, error) {
return
nil
,
err
}
node
.
Blocks
,
err
=
blockservice
.
New
(
node
.
Blockstore
,
node
.
Exchange
)
if
err
!=
nil
{
return
nil
,
err
}
node
.
DAG
=
merkledag
.
NewDAGService
(
node
.
Blocks
)
// to make sure nothing is omitted, init each individual field and assign
// all at once at the bottom.
return
&
Core
{
...
...
@@ -111,12 +105,19 @@ func MocknetTestRepo(p peer.ID, h host.Host, conf testutil.LatencyConfig) RepoFa
return
nil
,
err
}
exch
:=
bitswap
.
New
(
ctx
,
p
,
bsn
,
bstore
,
alwaysSendToPeer
)
blockservice
,
err
:=
blockservice
.
New
(
bstore
,
exch
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
core
.
IpfsNode
{
Peerstore
:
h
.
Peerstore
(),
Blockstore
:
bstore
,
Exchange
:
exch
,
Datastore
:
ds
,
PeerHost
:
h
,
DAG
:
merkledag
.
NewDAGService
(
blockservice
),
Blocks
:
blockservice
,
Routing
:
dhtt
,
Identity
:
p
,
DHT
:
dhtt
,
...
...
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