Skip to content

Commit ca167ce

Browse files
committed
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 <[email protected]>
1 parent d9c3202 commit ca167ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protos/gossip/extensions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ func (m *SignedGossipMessage) String() string {
535535
isSimpleMsg = true
536536
}
537537
if !isSimpleMsg {
538-
desc := fmt.Sprintf("Channel: %v, nonce: %d, tag: %s", m.Channel, m.Nonce, GossipMessage_Tag_name[int32(m.Tag)])
538+
desc := fmt.Sprintf("Channel: %s, nonce: %d, tag: %s", string(m.Channel), m.Nonce, GossipMessage_Tag_name[int32(m.Tag)])
539539
gMsg = fmt.Sprintf("%s %s", desc, gMsg)
540540
}
541541
}

0 commit comments

Comments
 (0)