File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1419,6 +1419,33 @@ func TestEasyAutoloop(t *testing.T) {
14191419
14201420 c .easyautoloop (step , true )
14211421 c .stop ()
1422+
1423+ // Restore the local balance to a higher value that will trigger a swap.
1424+ easyChannel2 .LocalBalance = btcutil .Amount (95000 )
1425+ channels = []lndclient.ChannelInfo {
1426+ easyChannel1 , easyChannel2 ,
1427+ }
1428+
1429+ // Override the feeppm with a lower one.
1430+ params .FeeLimit = NewFeePortion (5 )
1431+
1432+ c = newAutoloopTestCtx (t , params , channels , testRestrictions )
1433+ c .start ()
1434+
1435+ // Even though there should be a swap dispatched in order to meet the
1436+ // local balance target, we expect no action as the user defined feeppm
1437+ // should not be sufficient for the swap to be dispatched.
1438+ step = & easyAutoloopStep {
1439+ minAmt : 1 ,
1440+ maxAmt : 50000 ,
1441+ // Since we have the exact same balance as the first step, we
1442+ // can reuse the quoteOut1 for the expected loop out quote.
1443+ quotesOut : quotesOut1 ,
1444+ expectedOut : nil ,
1445+ }
1446+
1447+ c .easyautoloop (step , false )
1448+ c .stop ()
14221449}
14231450
14241451// existingSwapFromRequest is a helper function which returns the db
You can’t perform that action at this time.
0 commit comments