remove excessive log messages

Signed-off-by: Leo Chen <leo@harmony.one>
pull/465/head
Leo Chen 6 years ago
parent 3f5841e655
commit 1436dc19e5
  1. 3
      api/proto/discovery/pingpong.go
  2. 2
      node/node_handler.go
  3. 5
      p2p/host/message.go

@ -19,7 +19,6 @@ import (
"github.com/harmony-one/bls/ffi/go/bls"
"github.com/harmony-one/harmony/api/proto"
"github.com/harmony-one/harmony/api/proto/node"
"github.com/harmony-one/harmony/internal/utils"
"github.com/harmony-one/harmony/p2p"
)
@ -91,7 +90,7 @@ func NewPongMessage(peers []p2p.Peer, pubKeys []*bls.PublicKey, leaderKey *bls.P
}
pong.LeaderPubKey = leaderKey.Serialize()
utils.GetLogInstance().Info("[pong message]", "keys", len(pong.PubKeys), "peers", len(pong.Peers), "leader", len(pong.LeaderPubKey))
// utils.GetLogInstance().Info("[pong message]", "keys", len(pong.PubKeys), "peers", len(pong.Peers), "leader", len(pong.LeaderPubKey))
return pong
}

@ -457,7 +457,7 @@ func (node *Node) pongMessageHandler(msgPayload []byte) int {
publicKeys = append(publicKeys, &key)
}
utils.GetLogInstance().Debug("[pongMessageHandler]", "#keys", len(publicKeys), "#peers", len(peers))
// utils.GetLogInstance().Debug("[pongMessageHandler]", "#keys", len(publicKeys), "#peers", len(peers))
if node.State == NodeWaitToJoin {
node.State = NodeReadyForConsensus

@ -3,7 +3,6 @@ package host
import (
"encoding/binary"
"net"
"runtime"
"time"
"github.com/ethereum/go-ethereum/log"
@ -27,13 +26,13 @@ func BroadcastMessage(h p2p.Host, peers []p2p.Peer, msg []byte, lostPeer chan p2
content := ConstructP2pMessage(byte(17), msg)
length := len(content)
log.Info("Start Broadcasting", "gomaxprocs", runtime.GOMAXPROCS(0), "Size", length)
// log.Info("Start Broadcasting", "gomaxprocs", runtime.GOMAXPROCS(0), "Size", length)
start := time.Now()
for _, peer := range peers {
peerCopy := peer
go send(h, peerCopy, content, lostPeer)
}
log.Info("Broadcasting Done", "time spent(s)", time.Since(start).Seconds())
// log.Info("Broadcasting Done", "time spent(s)", time.Since(start).Seconds())
// Keep track of block propagation time
// Assume 1M message is for block propagation

Loading…
Cancel
Save