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-dms3
Commits
63c0d416
Commit
63c0d416
authored
Jan 10, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(core): perform sophisticated boostrap operation
parent
033e33da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
core/core.go
core/core.go
+5
-6
No files found.
core/core.go
View file @
63c0d416
...
...
@@ -269,14 +269,13 @@ func (n *IpfsNode) Resolve(k util.Key) (*merkledag.Node, error) {
return
(
&
path
.
Resolver
{
n
.
DAG
})
.
ResolvePath
(
k
.
String
())
}
// Bootstrap is undefined when node is not in OnlineMode
func
(
n
*
IpfsNode
)
Bootstrap
(
ctx
context
.
Context
,
peers
[]
peer
.
PeerInfo
)
error
{
// TODO what should return value be when in offlineMode?
if
n
.
DHT
!=
nil
{
for
_
,
p
:=
range
peers
{
// TODO bootstrap(ctx, n.PeerHost, n.DHT, n.Peerstore, peers)
if
err
:=
n
.
DHT
.
Connect
(
ctx
,
p
.
ID
);
err
!=
nil
{
return
err
}
}
return
bootstrap
(
ctx
,
n
.
PeerHost
,
n
.
DHT
,
n
.
Peerstore
,
peers
)
}
return
nil
}
...
...
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