routing: remove querybandwidth self node check
This function is only ever called for channels connected to self.
This commit is contained in:
parent
68f2a04f42
commit
b6102ad191
@ -619,15 +619,6 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
queryBandwidth := func(edge *channeldb.ChannelEdgeInfo) lnwire.MilliSatoshi {
|
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)
|
cid := lnwire.NewChanIDFromOutPoint(&edge.ChannelPoint)
|
||||||
link, err := s.htlcSwitch.GetLink(cid)
|
link, err := s.htlcSwitch.GetLink(cid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user