fix core NewNode not setting network field, and added new json serializer for diagnostics
Jeromy committed
Oct 13, 2014 at 16:36 UTC
b2bd6848a874a17d483fb48284cccbea741ce3cd
4 files changed
+8
-5
core/core.go
+3
@@ -108,6 +108,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
108
route *dht.IpfsDHT
109
exchangeSession exchange.Interface
110
diagnostics *diag.Diagnostics
111
+ network inet.Network
112
)
113
114
if online {
@@ -135,6 +136,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
136
if err != nil {
137
return nil, err
138
}
139
+ network = net
140
141
diagnostics = diag.NewDiagnostics(local, net, diagService)
142
diagService.SetHandler(diagnostics)
@@ -173,6 +175,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
175
Routing: route,
176
Namesys: ns,
177
Diagnostics: diagnostics,
178
+ Network: network,
179
}, nil
180
}
181
diagnostics/diag.go
+1
-1
@@ -1,4 +1,4 @@
1
-package diagnostic
1
+package diagnostics
2
3
import (
4
"bytes"
diagnostics/message.pb.go
+3
-3
@@ -3,7 +3,7 @@
3
// DO NOT EDIT!
4
5
/*
6
-Package diagnostic is a generated protocol buffer package.
6
+Package diagnostics is a generated protocol buffer package.
7
8
It is generated from these files:
9
message.proto
@@ -11,9 +11,9 @@ It is generated from these files:
11
It has these top-level messages:
12
Message
13
*/
14
-package diagnostic
14
+package diagnostics
15
16
-import proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto"
16
+import proto "code.google.com/p/goprotobuf/proto"
17
import math "math"
18
19
// Reference imports to suppress errors if they are not otherwise used.
diagnostics/message.proto
+1
-1
@@ -1,4 +1,4 @@
1
-package diagnostic;
1
+package diagnostics;
2
3
message Message {
4
required string DiagID = 1;