diff --git a/p2p/peer.go b/p2p/peer.go index 02472af16..7293a3cd9 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -41,14 +41,21 @@ func BroadcastMessage(peers []Peer, msg []byte) { } // Construct broadcast p2p message content := ConstructP2pMessage(byte(17), msg) + length := len(content) - log.Info("Start Broadcasting", "gomaxprocs", runtime.GOMAXPROCS(0), "Size", len(content)) + log.Info("Start Broadcasting", "gomaxprocs", runtime.GOMAXPROCS(0), "Size", length) start := time.Now() for _, peer := range peers { peerCopy := peer go send(peerCopy.Ip, peerCopy.Port, content) } log.Info("Broadcasting Done", "time spent(s)", time.Since(start).Seconds()) + + // Keep track of block propagation time + // Assume 1M message is for block propagation + if length > 1000000 { + log.Debug("NET: START BLOCK PROPAGATION", "Size", length) + } } func SelectMyPeers(peers []Peer, min int, max int) []Peer {