From 697394c1f483ef1ecc661c86783d6f7e98ba0100 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 17:26:02 +0100 Subject: [PATCH] ax(node): replace prose comment with usage example on MessageType AX Principle 2: comments must show HOW with real values, not restate what the type signature already says. Co-Authored-By: Charon --- pkg/node/message.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/node/message.go b/pkg/node/message.go index a8c0268..d2563d0 100644 --- a/pkg/node/message.go +++ b/pkg/node/message.go @@ -40,7 +40,8 @@ func IsProtocolVersionSupported(version string) bool { return false } -// MessageType defines the type of P2P message. +// msg, err := NewMessage(MsgPing, identity.ID, peer.ID, PingPayload{SentAt: time.Now().UnixMilli()}) +// if msg.Type == MsgHandshake { handleHandshake(msg) } type MessageType string const (