From d03cfd6aaa61c31e387b81be589177b05cbd2f6b Mon Sep 17 00:00:00 2001 From: cortze Date: Tue, 9 Apr 2024 12:41:20 +0200 Subject: [PATCH] fix slog formatting --- eth/node_config.go | 2 +- eth/topic_score_params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/node_config.go b/eth/node_config.go index 7ffe096..41d67ed 100644 --- a/eth/node_config.go +++ b/eth/node_config.go @@ -401,7 +401,7 @@ func (n *NodeConfig) getDesiredFullTopics(encoder encoder.NetworkEncoding) []str for idx, topicBase := range desiredTopics { topicFormat, err := topicFormatFromBase(topicBase) if err != nil { - slog.Warn("invalid gossipsub topic", topicBase) + slog.Warn("invalid gossipsub topic", slog.Attr{Key: "topic", Value: slog.StringValue(topicBase)}) continue } fullTopics[idx] = n.composeEthTopic(topicFormat, encoder) diff --git a/eth/topic_score_params.go b/eth/topic_score_params.go index e34a4dd..93c0b86 100644 --- a/eth/topic_score_params.go +++ b/eth/topic_score_params.go @@ -42,7 +42,7 @@ func topicToScoreParamsMapper(topic string) *pubsub.TopicScoreParams { return defaultBlockTopicParams() // TODO: extend this to more topics default: - slog.Warn("unrecognized gossip-topic to apply peerscores", topic) + slog.Warn("unrecognized gossip-topic to apply peerscores", slog.Attr{Key: "topic", Value: slog.StringValue(topic)}) return defaultBlockTopicParams() } }