mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 05:17:49 +08:00
fix core NewNode not setting network field, and added new json serializer for diagnostics
This commit is contained in:
parent
be5f9769b2
commit
b2bd6848a8
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
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.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package diagnostic;
|
||||
package diagnostics;
|
||||
|
||||
message Message {
|
||||
required string DiagID = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user