Skip to content

Commit

Permalink
fix core NewNode not setting network field, and added new json serial…
Browse files Browse the repository at this point in the history
…izer for diagnostics
  • Loading branch information
whyrusleeping committed Oct 13, 2014
1 parent 0a25a73 commit 4deac3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
route *dht.IpfsDHT
exchangeSession exchange.Interface
diagnostics *diag.Diagnostics
network inet.Network
)

if online {
Expand Down Expand Up @@ -135,6 +136,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
if err != nil {
return nil, err
}
network = net

diagnostics = diag.NewDiagnostics(local, net, diagService)
diagService.SetHandler(diagnostics)
Expand Down Expand Up @@ -173,6 +175,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
Routing: route,
Namesys: ns,
Diagnostics: diagnostics,
Network: network,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion diagnostics/diag.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package diagnostic
package diagnostics

import (
"bytes"
Expand Down
6 changes: 3 additions & 3 deletions diagnostics/message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion diagnostics/message.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package diagnostic;
package diagnostics;

message Message {
required string DiagID = 1;
Expand Down

0 comments on commit 4deac3b

Please sign in to comment.