@@ -548,6 +548,13 @@ func testCustomChannels(ctx context.Context, net *NetworkHarness,
548548 // Test case 5: Create an asset invoice on Fabia and pay it from
549549 // Charlie.
550550 // ------------
551+
552+ // First send some sats from Erin to Fabia, for Fabia to have some
553+ // minimal sats liquidity on her end.
554+ sendKeySendPayment (t .t , erin , fabia , 5000 )
555+
556+ logBalance (t .t , nodes , assetID , "after erin->fabia sats keysend" )
557+
551558 const fabiaInvoiceAssetAmount1 = 1000
552559 invoiceResp = createAssetInvoice (
553560 t .t , erin , fabia , fabiaInvoiceAssetAmount1 , assetID ,
@@ -987,6 +994,13 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
987994 // Test case 5: Create an asset invoice on Fabia and pay it from
988995 // Charlie.
989996 // ------------
997+
998+ // First send some sats from Erin to Fabia, for Fabia to have some
999+ // minimal sats liquidity on her end.
1000+ sendKeySendPayment (t .t , erin , fabia , 5000 )
1001+
1002+ logBalance (t .t , nodes , assetID , "after erin->fabia sats keysend" )
1003+
9901004 const fabiaInvoiceAssetAmount1 = 1000
9911005 invoiceResp = createAssetInvoice (
9921006 t .t , erin , fabia , fabiaInvoiceAssetAmount1 , nil ,
@@ -1289,16 +1303,23 @@ func testCustomChannelsGroupTranchesForceClose(ctx context.Context,
12891303 // that transports assets from two tranches.
12901304 // ------------
12911305 const (
1292- keySendAmount = 5000
1293- numSends = 6
1294- totalFirstSend = keySendAmount * numSends
1306+ keySendAmount = 5000
1307+ keySendSatAmount = 5000
1308+ numSends = 6
1309+ totalFirstSend = keySendAmount * numSends
12951310 )
12961311 for i := 0 ; i < numSends ; i ++ {
12971312 sendAssetKeySendPayment (
12981313 t .t , charlie , dave , keySendAmount , nil ,
12991314 fn .None [int64 ](), withGroupKey (groupKey ),
13001315 )
13011316 }
1317+
1318+ // With noop HTLCs implemented the sats balance of Dave will only
1319+ // increase up to the reserve amount. Let's make a direct non-asset
1320+ // keysend to make sure the sats balance is also enough.
1321+ sendKeySendPayment (t .t , charlie , dave , keySendSatAmount )
1322+
13021323 logBalanceGroup (t .t , nodes , groupIDs , "after keysend Charlie->Dave" )
13031324
13041325 // ------------
@@ -1538,8 +1559,9 @@ func testCustomChannelsGroupTranchesHtlcForceClose(ctx context.Context,
15381559 // First, we'll send over some funds from Charlie to Dave, as we want
15391560 // Dave to be able to extend HTLCs in the other direction.
15401561 const (
1541- numPayments = 10
1542- keySendAmount = 2_500
1562+ numPayments = 10
1563+ keySendAmount = 2_500
1564+ keySendSatAmount = 5_000
15431565 )
15441566 for i := 0 ; i < numPayments ; i ++ {
15451567 sendAssetKeySendPayment (
@@ -1548,6 +1570,11 @@ func testCustomChannelsGroupTranchesHtlcForceClose(ctx context.Context,
15481570 )
15491571 }
15501572
1573+ // With noop HTLCs implemented the sats balance of Dave will only
1574+ // increase up to the reserve amount. Let's make a direct non-asset
1575+ // keysend to make sure the sats balance is also enough.
1576+ sendKeySendPayment (t .t , charlie , dave , keySendSatAmount )
1577+
15511578 // Now that both parties have some funds, we'll move onto the main test.
15521579 //
15531580 // We'll make 2 hodl invoice for each peer, so 4 total. From Charlie's
@@ -4219,16 +4246,24 @@ func runCustomChannelsHtlcForceClose(ctx context.Context, t *harnessTest,
42194246 // First, we'll send over some funds from Alice to Bob, as we want Bob
42204247 // to be able to extend HTLCs in the other direction.
42214248 const (
4222- numPayments = 10
4223- keySendAmount = 2_500
4249+ numPayments = 10
4250+ keySendAssetAmount = 2_500
4251+ keySendSatAmount = 5_000
42244252 )
42254253 for i := 0 ; i < numPayments ; i ++ {
42264254 sendAssetKeySendPayment (
4227- t .t , alice , bob , keySendAmount , assetID ,
4255+ t .t , alice , bob , keySendAssetAmount , assetID ,
42284256 fn .None [int64 ](),
42294257 )
42304258 }
42314259
4260+ // With noop HTLCs implemented the sats balance of Bob will only
4261+ // increase up to the reserve amount. Let's make a direct non-asset
4262+ // keysend to make sure the sats balance is also enough.
4263+ sendKeySendPayment (t .t , alice , bob , keySendSatAmount )
4264+
4265+ logBalance (t .t , nodes , assetID , "after keysends to Bob" )
4266+
42324267 // Now that both parties have some funds, we'll move onto the main test.
42334268 //
42344269 // We'll make 2 hodl invoice for each peer, so 4 total. From Alice's
0 commit comments