@ -417,7 +417,7 @@ func (m *Manager) autoloop(ctx context.Context) error {
// swaps for autoloop.
// swaps for autoloop.
m . refreshAutoloopBudget ( ctx )
m . refreshAutoloopBudget ( ctx )
suggestion , err := m . SuggestSwaps ( ctx , true )
suggestion , err := m . SuggestSwaps ( ctx )
if err != nil {
if err != nil {
return err
return err
}
}
@ -613,7 +613,7 @@ func (m *Manager) dispatchBestEasyAutoloopSwap(ctx context.Context) error {
}
}
suggestion , err := builder . buildSwap (
suggestion , err := builder . buildSwap (
ctx , channel . PubKeyBytes , outgoing , swapAmt , true , easyParams ,
ctx , channel . PubKeyBytes , outgoing , swapAmt , easyParams ,
)
)
if err != nil {
if err != nil {
return err
return err
@ -697,7 +697,7 @@ func (m *Manager) singleReasonSuggestion(reason Reason) *Suggestions {
// suggestions are being used for our internal autolooper. This boolean is used
// suggestions are being used for our internal autolooper. This boolean is used
// to determine the information we add to our swap suggestion and whether we
// to determine the information we add to our swap suggestion and whether we
// return any suggestions.
// return any suggestions.
func ( m * Manager ) SuggestSwaps ( ctx context . Context , autoloop bool ) (
func ( m * Manager ) SuggestSwaps ( ctx context . Context ) (
* Suggestions , error ) {
* Suggestions , error ) {
m . paramsLock . Lock ( )
m . paramsLock . Lock ( )
@ -794,7 +794,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) (
suggestion , err := m . suggestSwap (
suggestion , err := m . suggestSwap (
ctx , traffic , balances , rule , outRestrictions ,
ctx , traffic , balances , rule , outRestrictions ,
inRestrictions , autoloop ,
inRestrictions ,
)
)
var reasonErr * reasonError
var reasonErr * reasonError
if errors . As ( err , & reasonErr ) {
if errors . As ( err , & reasonErr ) {
@ -820,7 +820,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) (
suggestion , err := m . suggestSwap (
suggestion , err := m . suggestSwap (
ctx , traffic , balance , rule , outRestrictions ,
ctx , traffic , balance , rule , outRestrictions ,
inRestrictions , autoloop ,
inRestrictions ,
)
)
var reasonErr * reasonError
var reasonErr * reasonError
@ -922,7 +922,7 @@ func (m *Manager) SuggestSwaps(ctx context.Context, autoloop bool) (
// swap request for the rule provided.
// swap request for the rule provided.
func ( m * Manager ) suggestSwap ( ctx context . Context , traffic * swapTraffic ,
func ( m * Manager ) suggestSwap ( ctx context . Context , traffic * swapTraffic ,
balance * balances , rule * SwapRule , outRestrictions * Restrictions ,
balance * balances , rule * SwapRule , outRestrictions * Restrictions ,
inRestrictions * Restrictions , autoloop bool ) ( swapSuggestion , error ) {
inRestrictions * Restrictions ) ( swapSuggestion , error ) {
var (
var (
builder swapBuilder
builder swapBuilder
@ -967,8 +967,7 @@ func (m *Manager) suggestSwap(ctx context.Context, traffic *swapTraffic,
}
}
return builder . buildSwap (
return builder . buildSwap (
ctx , balance . pubkey , balance . channels , amount , autoloop ,
ctx , balance . pubkey , balance . channels , amount , m . params ,
m . params ,
)
)
}
}