Skip to content

Commit

Permalink
chore(p2p): remove some trace logs that don't bring value
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Aug 8, 2024
1 parent ce83220 commit ef8b851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/consensus/state_prevoter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newPrevote(logger log.Logger, voteSigner *voteSigner, blockExec *blockExecu
func (p *prevoter) Do(ctx context.Context, stateData *StateData) error {
err := stateData.isValidForPrevote()
if err != nil {
keyVals := append(prevoteKeyVals(stateData), "error", err)
keyVals := append(prevoteKeyVals(stateData), "err", err)

if !errors.Is(err, errPrevoteProposalBlockNil) {
p.logger.Error("prevote is invalid", keyVals...)
Expand Down
8 changes: 4 additions & 4 deletions internal/p2p/conn/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (c *MConnection) String() string {
}

func (c *MConnection) flush() {
c.logger.Trace("Flush", "conn", c)
// c.logger.Trace("Flush", "conn", c)
err := c.bufConnWriter.Flush()
if err != nil {
c.logger.Debug("MConnection flush failed", "err", err)
Expand Down Expand Up @@ -304,7 +304,7 @@ func (c *MConnection) Send(chID ChannelID, msgBytes []byte) bool {
return false
}

c.logger.Trace("Send", "channel", chID, "conn", c, "msgBytes", msgBytes)
// c.logger.Trace("Send", "channel", chID, "conn", c, "msgBytes", msgBytes)

// Send message to channel.
channel, ok := c.channelsIdx[chID]
Expand Down Expand Up @@ -557,7 +557,7 @@ FOR_LOOP:
break FOR_LOOP
}
if msgBytes != nil {
c.logger.Trace("Received bytes", "chID", channelID, "msgBytes", msgBytes)
// c.logger.Trace("Received bytes", "chID", channelID, "msgBytes", msgBytes)
// NOTE: This means the reactor.Receive runs in the same thread as the p2p recv routine
c.onReceive(ctx, channelID, msgBytes)
}
Expand Down Expand Up @@ -735,7 +735,7 @@ func (ch *channel) writePacketMsgTo(w io.Writer) (n int, err error) {
// complete, which is owned by the caller and will not be modified.
// Not goroutine-safe
func (ch *channel) recvPacketMsg(packet tmp2p.PacketMsg) ([]byte, error) {
ch.logger.Trace("Read PacketMsg", "conn", ch.conn, "packet", packet)
// ch.logger.Trace("Read PacketMsg", "conn", ch.conn, "packet", packet)
var recvCap, recvReceived = ch.desc.RecvMessageCapacity, len(ch.recving) + len(packet.Data)
if recvCap < recvReceived {
return nil, fmt.Errorf("received message exceeds available capacity: %v < %v", recvCap, recvReceived)
Expand Down

0 comments on commit ef8b851

Please sign in to comment.