@@ -548,6 +548,13 @@ func testCustomChannels(ctx context.Context, net *NetworkHarness,
548
548
// Test case 5: Create an asset invoice on Fabia and pay it from
549
549
// Charlie.
550
550
// ------------
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
+
551
558
const fabiaInvoiceAssetAmount1 = 1000
552
559
invoiceResp = createAssetInvoice (
553
560
t .t , erin , fabia , fabiaInvoiceAssetAmount1 , assetID ,
@@ -987,6 +994,13 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
987
994
// Test case 5: Create an asset invoice on Fabia and pay it from
988
995
// Charlie.
989
996
// ------------
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
+
990
1004
const fabiaInvoiceAssetAmount1 = 1000
991
1005
invoiceResp = createAssetInvoice (
992
1006
t .t , erin , fabia , fabiaInvoiceAssetAmount1 , nil ,
@@ -1289,16 +1303,23 @@ func testCustomChannelsGroupTranchesForceClose(ctx context.Context,
1289
1303
// that transports assets from two tranches.
1290
1304
// ------------
1291
1305
const (
1292
- keySendAmount = 5000
1293
- numSends = 6
1294
- totalFirstSend = keySendAmount * numSends
1306
+ keySendAmount = 5000
1307
+ keySendSatAmount = 5000
1308
+ numSends = 6
1309
+ totalFirstSend = keySendAmount * numSends
1295
1310
)
1296
1311
for i := 0 ; i < numSends ; i ++ {
1297
1312
sendAssetKeySendPayment (
1298
1313
t .t , charlie , dave , keySendAmount , nil ,
1299
1314
fn .None [int64 ](), withGroupKey (groupKey ),
1300
1315
)
1301
1316
}
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
+
1302
1323
logBalanceGroup (t .t , nodes , groupIDs , "after keysend Charlie->Dave" )
1303
1324
1304
1325
// ------------
@@ -1538,8 +1559,9 @@ func testCustomChannelsGroupTranchesHtlcForceClose(ctx context.Context,
1538
1559
// First, we'll send over some funds from Charlie to Dave, as we want
1539
1560
// Dave to be able to extend HTLCs in the other direction.
1540
1561
const (
1541
- numPayments = 10
1542
- keySendAmount = 2_500
1562
+ numPayments = 10
1563
+ keySendAmount = 2_500
1564
+ keySendSatAmount = 5000
1543
1565
)
1544
1566
for i := 0 ; i < numPayments ; i ++ {
1545
1567
sendAssetKeySendPayment (
@@ -1548,6 +1570,11 @@ func testCustomChannelsGroupTranchesHtlcForceClose(ctx context.Context,
1548
1570
)
1549
1571
}
1550
1572
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
+
1551
1578
// Now that both parties have some funds, we'll move onto the main test.
1552
1579
//
1553
1580
// 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,
4219
4246
// First, we'll send over some funds from Alice to Bob, as we want Bob
4220
4247
// to be able to extend HTLCs in the other direction.
4221
4248
const (
4222
- numPayments = 10
4223
- keySendAmount = 2_500
4249
+ numPayments = 10
4250
+ keySendAssetAmount = 2_500
4251
+ keySendSatAmount = 5_000
4224
4252
)
4225
4253
for i := 0 ; i < numPayments ; i ++ {
4226
4254
sendAssetKeySendPayment (
4227
- t .t , alice , bob , keySendAmount , assetID ,
4255
+ t .t , alice , bob , keySendAssetAmount , assetID ,
4228
4256
fn .None [int64 ](),
4229
4257
)
4230
4258
}
4231
4259
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
+
4232
4267
// Now that both parties have some funds, we'll move onto the main test.
4233
4268
//
4234
4269
// We'll make 2 hodl invoice for each peer, so 4 total. From Alice's
0 commit comments