Skip to content

Commit

Permalink
peer: modify ReplyChannelRange log message
Browse files Browse the repository at this point in the history
The message now shows the block range the reply spans, which is a lot
more useful.
  • Loading branch information
wpaulino committed Dec 18, 2019
1 parent bcf614b commit 2e9e7a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions peer.go
Expand Up @@ -1336,17 +1336,19 @@ func messageSummary(msg lnwire.Message) string {
msg.Complete)

case *lnwire.ReplyChannelRange:
return fmt.Sprintf("complete=%v, encoding=%v, num_chans=%v",
msg.Complete, msg.EncodingType, len(msg.ShortChanIDs))
return fmt.Sprintf("start_height=%v, end_height=%v, "+
"num_chans=%v, encoding=%v", msg.FirstBlockHeight,
msg.LastBlockHeight(), len(msg.ShortChanIDs),
msg.EncodingType)

case *lnwire.QueryShortChanIDs:
return fmt.Sprintf("chain_hash=%v, encoding=%v, num_chans=%v",
msg.ChainHash, msg.EncodingType, len(msg.ShortChanIDs))

case *lnwire.QueryChannelRange:
return fmt.Sprintf("chain_hash=%v, start_height=%v, "+
"num_blocks=%v", msg.ChainHash, msg.FirstBlockHeight,
msg.NumBlocks)
"end_height=%v", msg.ChainHash, msg.FirstBlockHeight,
msg.LastBlockHeight())

case *lnwire.GossipTimestampRange:
return fmt.Sprintf("chain_hash=%v, first_stamp=%v, "+
Expand Down

0 comments on commit 2e9e7a7

Please sign in to comment.