Skip to content

Commit 0060494

Browse files
authored
moves sent counter to happypath (wormhole-foundation#3928)
1 parent 15877b5 commit 0060494

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

node/pkg/p2p/ccq_p2p.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ func (ccq *ccqP2p) run(
153153
if _, found := ccq.allowedPeers[msg.GetFrom().String()]; found {
154154
return true
155155
}
156-
ccq.logger.Debug("Dropping message from unknown peer", zap.String("fromPeerID", from.String()), zap.String("msgPeerID", msg.ReceivedFrom.String()), zap.String("msgFrom", msg.GetFrom().String()))
156+
ccq.logger.Debug("Dropping message from unknown peer",
157+
zap.String("fromPeerID", from.String()),
158+
zap.String("msgPeerID", msg.ReceivedFrom.String()),
159+
zap.String("msgFrom", msg.GetFrom().String()))
157160
return false
158161
})
159162
if err != nil {
@@ -261,7 +264,6 @@ func (ccq *ccqP2p) publisher(ctx context.Context, gk *ecdsa.PrivateKey, queryRes
261264
panic(err)
262265
}
263266
err = ccq.th_resp.Publish(ctx, b)
264-
ccqP2pMessagesSent.Inc()
265267
if err != nil {
266268
ccq.logger.Error("failed to publish query response",
267269
zap.String("requestSignature", msg.Signature()),
@@ -270,6 +272,7 @@ func (ccq *ccqP2p) publisher(ctx context.Context, gk *ecdsa.PrivateKey, queryRes
270272
zap.Error(err),
271273
)
272274
} else {
275+
ccqP2pMessagesSent.Inc()
273276
ccq.logger.Info("published signed query response", //TODO: Change to Debug
274277
zap.String("requestSignature", msg.Signature()),
275278
zap.Any("query_response", msg),

0 commit comments

Comments
 (0)