Skip to content

Commit

Permalink
FAB-5331 Fix formatting of channel name
Browse files Browse the repository at this point in the history
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 <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Jul 16, 2017
1 parent d9c3202 commit ca167ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protos/gossip/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit ca167ce

Please sign in to comment.