Commit 833b1cbb authored by harrylee's avatar harrylee

fix a bug for localPeer logger nil pointer dereference

parent c056eb0f
......@@ -17,6 +17,7 @@ const (
Router = "router"
Swarm = "swarm"
Syncer = "syncer"
Local = "local"
)
var w *loggerWrapper
......
......@@ -2,6 +2,7 @@ package peermgr
import (
"errors"
"gitlab.33.cn/link33/sidecar/internal/loggers"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/meshplus/bitxhub-kit/crypto"
......@@ -30,6 +31,7 @@ func newLocal(id peer.ID, privKey crypto.PrivateKey) *localPeer {
tag: Office,
rev: make(chan *pb.Message, port.MaxCapacity),
privKey: privKey,
logger: loggers.Logger(loggers.Local),
}
}
......
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