Commit b2bd6848 authored by Jeromy's avatar Jeromy Committed by Juan Batiz-Benet

fix core NewNode not setting network field, and added new json serializer for diagnostics

parent be5f9769
......@@ -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 {
......@@ -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)
......@@ -173,6 +175,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
Routing: route,
Namesys: ns,
Diagnostics: diagnostics,
Network: network,
}, nil
}
......
package diagnostic
package diagnostics
import (
"bytes"
......
......@@ -3,7 +3,7 @@
// DO NOT EDIT!
/*
Package diagnostic is a generated protocol buffer package.
Package diagnostics is a generated protocol buffer package.
It is generated from these files:
message.proto
......@@ -11,9 +11,9 @@ It is generated from these files:
It has these top-level messages:
Message
*/
package diagnostic
package diagnostics
import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto"
import proto "code.google.com/p/goprotobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
......
package diagnostic;
package diagnostics;
message Message {
required string DiagID = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment