routing: display channel capacity in info logging message

This commit is contained in:
Olaoluwa Osuntokun 2017-04-14 11:48:04 -07:00
parent d146411712
commit c8bf521c75
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -544,9 +544,7 @@ func (r *ChannelRouter) processUpdate(msg interface{}) error {
if err != nil && err != channeldb.ErrGraphNoEdgesFound { if err != nil && err != channeldb.ErrGraphNoEdgesFound {
return errors.Errorf("unable to check for edge "+ return errors.Errorf("unable to check for edge "+
"existence: %v", err) "existence: %v", err)
} else if exists { } else if exists {
return newErrf(ErrIgnored, "Ignoring msg for known "+ return newErrf(ErrIgnored, "Ignoring msg for known "+
"chan_id=%v", msg.ChannelID) "chan_id=%v", msg.ChannelID)
} }
@ -604,10 +602,11 @@ func (r *ChannelRouter) processUpdate(msg interface{}) error {
invalidateCache = true invalidateCache = true
log.Infof("New channel discovered! Link "+ log.Infof("New channel discovered! Link "+
"connects %x and %x with ChannelPoint(%v), chan_id=%v", "connects %x and %x with ChannelPoint(%v): "+
"chan_id=%v, capacity=%v",
msg.NodeKey1.SerializeCompressed(), msg.NodeKey1.SerializeCompressed(),
msg.NodeKey2.SerializeCompressed(), msg.NodeKey2.SerializeCompressed(),
fundingPoint, msg.ChannelID) fundingPoint, msg.ChannelID, msg.Capacity)
case *channeldb.ChannelEdgePolicy: case *channeldb.ChannelEdgePolicy:
channelID := lnwire.NewShortChanIDFromInt(msg.ChannelID) channelID := lnwire.NewShortChanIDFromInt(msg.ChannelID)