From b6102ad191f1a033a81fc846953298341e3cb73a Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 21 May 2019 10:04:57 +0200 Subject: [PATCH] routing: remove querybandwidth self node check This function is only ever called for channels connected to self. --- server.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/server.go b/server.go index d11fede0..cac4125b 100644 --- a/server.go +++ b/server.go @@ -619,15 +619,6 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl, } queryBandwidth := func(edge *channeldb.ChannelEdgeInfo) lnwire.MilliSatoshi { - // If we aren't on either side of this edge, then we'll - // just thread through the capacity of the edge as we - // know it. - if !bytes.Equal(edge.NodeKey1Bytes[:], selfNode.PubKeyBytes[:]) && - !bytes.Equal(edge.NodeKey2Bytes[:], selfNode.PubKeyBytes[:]) { - - return lnwire.NewMSatFromSatoshis(edge.Capacity) - } - cid := lnwire.NewChanIDFromOutPoint(&edge.ChannelPoint) link, err := s.htlcSwitch.GetLink(cid) if err != nil {