From fcf6ecbb589742ae406587ef6480f52dc708443f Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 3 Oct 2024 19:03:56 +0900 Subject: [PATCH] fix: update based on feedback --- node/pkg/aggregator/aggregator.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/pkg/aggregator/aggregator.go b/node/pkg/aggregator/aggregator.go index 4a531575f..58fb0d649 100644 --- a/node/pkg/aggregator/aggregator.go +++ b/node/pkg/aggregator/aggregator.go @@ -163,12 +163,12 @@ func (n *Aggregator) HandlePriceDataMessage(ctx context.Context, msg raft.Messag defer n.roundPrices.mu.Unlock() if n.roundPrices.locked[priceDataMessage.RoundID] { - log.Warn().Str("Player", "Aggregator").Str("transmissionDelay", time.Since(msg.Timestamp).String()).Int32("RoundID", priceDataMessage.RoundID).Msg("price data message already processed") + log.Warn().Str("Player", "Aggregator").Str("Sender", msg.SentFrom).Str("Me", n.Raft.GetHostId()).Str("transmissionDelay", time.Since(msg.Timestamp).String()).Int32("RoundID", priceDataMessage.RoundID).Msg("price data message already processed") return nil } if n.roundPrices.isReplay(priceDataMessage.RoundID, msg.SentFrom) { - log.Warn().Str("Player", "Aggregator").Int32("RoundID", priceDataMessage.RoundID).Msg("price data message replayed") + log.Warn().Str("Player", "Aggregator").Str("Sender", msg.SentFrom).Str("Me", n.Raft.GetHostId()).Int32("RoundID", priceDataMessage.RoundID).Msg("price data message replayed") return nil } @@ -297,12 +297,12 @@ func (n *Aggregator) HandleProofMessage(ctx context.Context, msg raft.Message) e defer n.roundProofs.mu.Unlock() if n.roundProofs.locked[proofMessage.RoundID] { - log.Warn().Str("Player", "Aggregator").Str("transmissionDelay", time.Since(msg.Timestamp).String()).Int32("RoundID", proofMessage.RoundID).Msg("proof message already processed") + log.Warn().Str("Player", "Aggregator").Str("Sender", msg.SentFrom).Str("Me", n.Raft.GetHostId()).Str("transmissionDelay", time.Since(msg.Timestamp).String()).Int32("RoundID", proofMessage.RoundID).Msg("proof message already processed") return nil } if n.roundProofs.isReplay(proofMessage.RoundID, msg.SentFrom) { - log.Warn().Str("Player", "Aggregator").Int32("RoundID", proofMessage.RoundID).Msg("proof message replayed") + log.Warn().Str("Player", "Aggregator").Str("Sender", msg.SentFrom).Str("Me", n.Raft.GetHostId()).Int32("RoundID", proofMessage.RoundID).Msg("proof message replayed") return nil }