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
f3b71cfb
Commit
f3b71cfb
authored
Nov 25, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log(core) Event: bootstrap
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
9e6177ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
core/core.go
core/core.go
+6
-1
No files found.
core/core.go
View file @
f3b71cfb
...
...
@@ -29,11 +29,12 @@ import (
u
"github.com/jbenet/go-ipfs/util"
ctxc
"github.com/jbenet/go-ipfs/util/ctxcloser"
"github.com/jbenet/go-ipfs/util/debugerror"
"github.com/jbenet/go-ipfs/util/eventlog"
)
const
IpnsValidatorTag
=
"ipns"
var
log
=
u
.
Logger
(
"core"
)
var
log
=
eventlog
.
Logger
(
"core"
)
// IpfsNode is IPFS Core module. It represents an IPFS instance.
type
IpfsNode
struct
{
...
...
@@ -242,6 +243,8 @@ func initIdentity(cfg *config.Identity, peers peer.Peerstore, online bool) (peer
}
func
initConnections
(
ctx
context
.
Context
,
cfg
*
config
.
Config
,
pstore
peer
.
Peerstore
,
route
*
dht
.
IpfsDHT
)
{
// TODO consider stricter error handling
// TODO consider Criticalf error logging
for
_
,
p
:=
range
cfg
.
Bootstrap
{
if
p
.
PeerID
==
""
{
log
.
Criticalf
(
"error: peer does not include PeerID. %v"
,
p
)
...
...
@@ -263,7 +266,9 @@ func initConnections(ctx context.Context, cfg *config.Config, pstore peer.Peerst
if
_
,
err
=
route
.
Connect
(
ctx
,
npeer
);
err
!=
nil
{
log
.
Criticalf
(
"Bootstrapping error: %v"
,
err
)
continue
}
log
.
Event
(
ctx
,
"bootstrap"
,
npeer
)
}
}
...
...
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