peer: display reversed bytes of chain hash in message summaries

This commit is contained in:
Olaoluwa Osuntokun 2017-10-17 19:35:10 -07:00
parent dc124baca1
commit f953f94f71
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 6 additions and 6 deletions

12
peer.go
View File

@ -766,9 +766,9 @@ func messageSummary(msg lnwire.Message) string {
return ""
case *lnwire.OpenChannel:
return fmt.Sprintf("temp_chan_id=%x, chain=%x, csv=%v, amt=%v, "+
return fmt.Sprintf("temp_chan_id=%x, chain=%v, csv=%v, amt=%v, "+
"push_amt=%v, reserve=%v, flags=%v",
msg.ChainHash[:], msg.PendingChannelID[:],
msg.PendingChannelID[:], msg.ChainHash,
msg.CsvDelay, msg.FundingAmount, msg.PushAmount,
msg.ChannelReserve, msg.ChannelFlags)
@ -828,12 +828,12 @@ func messageSummary(msg lnwire.Message) string {
msg.ShortChannelID.ToUint64())
case *lnwire.ChannelAnnouncement:
return fmt.Sprintf("chain_hash=%x, short_chan_id=%v",
msg.ChainHash[:], msg.ShortChannelID.ToUint64())
return fmt.Sprintf("chain_hash=%v, short_chan_id=%v",
msg.ChainHash, msg.ShortChannelID.ToUint64())
case *lnwire.ChannelUpdate:
return fmt.Sprintf("chain_hash=%x, short_chan_id=%v, update_time=%v",
msg.ChainHash[:], msg.ShortChannelID.ToUint64(),
return fmt.Sprintf("chain_hash=%v, short_chan_id=%v, update_time=%v",
msg.ChainHash, msg.ShortChannelID.ToUint64(),
time.Unix(int64(msg.Timestamp), 0))
case *lnwire.NodeAnnouncement: