mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
atpl: remove unneeded extra filter on address availability
This commit removes an extra filter on address availability which is not needed as the scored nodes are a already prefiltered subset of the whole graph where address availability has already been checked.
This commit is contained in:
parent
0fab14502d
commit
906b0b707b
@ -657,17 +657,6 @@ func (a *Agent) openChans(availableFunds btcutil.Amount, numChans uint32,
|
||||
log.Tracef("Creating attachment directive for chosen node %x",
|
||||
nID[:])
|
||||
|
||||
// Add addresses to the candidates.
|
||||
addrs := addresses[nID]
|
||||
|
||||
// If the node has no known addresses, we cannot connect to it,
|
||||
// so we'll skip it.
|
||||
if len(addrs) == 0 {
|
||||
log.Tracef("Skipping scored node %x with no addresses",
|
||||
nID[:])
|
||||
continue
|
||||
}
|
||||
|
||||
// Track the available funds we have left.
|
||||
if availableFunds < chanSize {
|
||||
chanSize = availableFunds
|
||||
@ -685,7 +674,7 @@ func (a *Agent) openChans(availableFunds btcutil.Amount, numChans uint32,
|
||||
chanCandidates[nID] = &AttachmentDirective{
|
||||
NodeID: nID,
|
||||
ChanAmt: chanSize,
|
||||
Addrs: addrs,
|
||||
Addrs: addresses[nID],
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user