From ca167ce846372be568b1d693e67416fb1d6f13cd Mon Sep 17 00:00:00 2001 From: yacovm Date: Sun, 16 Jul 2017 16:24:27 +0300 Subject: [PATCH] FAB-5331 Fix formatting of channel name Historically, gossip keeps the channel name in messages []byte instead of in *string*s. There is a String() method that formats complex messages It would be beneficial to print instead a string, for usability of log parsing. Change-Id: I71351fa324d6e1ca583588dab089a9e887996f7f Signed-off-by: yacovm --- protos/gossip/extensions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protos/gossip/extensions.go b/protos/gossip/extensions.go index 210081de4d8..0adb1d08b98 100644 --- a/protos/gossip/extensions.go +++ b/protos/gossip/extensions.go @@ -535,7 +535,7 @@ func (m *SignedGossipMessage) String() string { isSimpleMsg = true } if !isSimpleMsg { - desc := fmt.Sprintf("Channel: %v, nonce: %d, tag: %s", m.Channel, m.Nonce, GossipMessage_Tag_name[int32(m.Tag)]) + desc := fmt.Sprintf("Channel: %s, nonce: %d, tag: %s", string(m.Channel), m.Nonce, GossipMessage_Tag_name[int32(m.Tag)]) gMsg = fmt.Sprintf("%s %s", desc, gMsg) } }