@ -930,8 +930,6 @@ func (m *Manager) checkExistingAutoLoops(ctx context.Context,
// getEligibleChannels takes lists of our existing loop out and in swaps, and
// getEligibleChannels takes lists of our existing loop out and in swaps, and
// gets a list of channels that are not currently being utilized for a swap.
// gets a list of channels that are not currently being utilized for a swap.
// If an unrestricted swap is ongoing, we return an empty set of channels
// because we don't know which channels balances it will affect.
func ( m * Manager ) getEligibleChannels ( ctx context . Context ,
func ( m * Manager ) getEligibleChannels ( ctx context . Context ,
loopOut [ ] * loopdb . LoopOut , loopIn [ ] * loopdb . LoopIn ) (
loopOut [ ] * loopdb . LoopOut , loopIn [ ] * loopdb . LoopIn ) (
[ ] lndclient . ChannelInfo , error ) {
[ ] lndclient . ChannelInfo , error ) {
@ -988,13 +986,6 @@ func (m *Manager) getEligibleChannels(ctx context.Context,
continue
continue
}
}
if len ( chanSet ) == 0 {
log . Debugf ( "Ongoing unrestricted loop out: " +
"%v, no suggestions at present" , out . Hash )
return nil , nil
}
for _ , id := range chanSet {
for _ , id := range chanSet {
chanID := lnwire . NewShortChanIDFromInt ( id )
chanID := lnwire . NewShortChanIDFromInt ( id )
existingOut [ chanID ] = true
existingOut [ chanID ] = true
@ -1007,11 +998,9 @@ func (m *Manager) getEligibleChannels(ctx context.Context,
continue
continue
}
}
// Skip over swaps that may come through any peer.
if in . Contract . LastHop == nil {
if in . Contract . LastHop == nil {
log . Debugf ( "Ongoing unrestricted loop in: " +
continue
"%v, no suggestions at present" , in . Hash )
return nil , nil
}
}
existingIn [ * in . Contract . LastHop ] = true
existingIn [ * in . Contract . LastHop ] = true