Make harmony/bootnode log connections to singleton

pull/1074/head
Eugene Kim 6 years ago
parent 6fdfd968c3
commit f8b04145ff
  1. 2
      cmd/bootnode/main.go
  2. 2
      cmd/harmony/main.go

@ -77,7 +77,7 @@ func main() {
log.Info("bootnode", "BN_MA", fmt.Sprintf("/ip4/%s/tcp/%s/p2p/%s", *ip, *port, host.GetID().Pretty())) log.Info("bootnode", "BN_MA", fmt.Sprintf("/ip4/%s/tcp/%s/p2p/%s", *ip, *port, host.GetID().Pretty()))
if *logConn { if *logConn {
host.GetP2PHost().Network().Notify(utils.RootConnLogger) host.GetP2PHost().Network().Notify(utils.NewConnLogger(utils.GetLogInstance()))
} }
dataStore := dsync.MutexWrap(ds.NewMapDatastore()) dataStore := dsync.MutexWrap(ds.NewMapDatastore())

@ -291,7 +291,7 @@ func createGlobalConfig() *nodeconfig.ConfigType {
nodeConfig.Host, err = p2pimpl.NewHost(&nodeConfig.SelfPeer, nodeConfig.P2pPriKey) nodeConfig.Host, err = p2pimpl.NewHost(&nodeConfig.SelfPeer, nodeConfig.P2pPriKey)
if *logConn { if *logConn {
nodeConfig.Host.GetP2PHost().Network().Notify(utils.RootConnLogger) nodeConfig.Host.GetP2PHost().Network().Notify(utils.NewConnLogger(utils.GetLogInstance()))
} }
if err != nil { if err != nil {
panic("unable to new host in harmony") panic("unable to new host in harmony")

Loading…
Cancel
Save