@@ -260,10 +260,11 @@ func testCustomChannelsLarge(_ context.Context, net *NetworkHarness,
260
260
// sender side show the individual HTLCs that arrived for it and that
261
261
// they show the correct asset amounts when decoded.
262
262
assertInvoiceHtlcAssets (
263
- t .t , dave , invoiceResp3 , assetID , largeInvoiceAmount ,
263
+ t .t , dave , invoiceResp3 , assetID , nil , largeInvoiceAmount ,
264
264
)
265
265
assertPaymentHtlcAssets (
266
- t .t , charlie , invoiceResp3 .RHash , assetID , largeInvoiceAmount ,
266
+ t .t , charlie , invoiceResp3 .RHash , assetID , nil ,
267
+ largeInvoiceAmount ,
267
268
)
268
269
269
270
// We keysend the rest, so that all the balance is on Dave's side.
@@ -449,10 +450,11 @@ func testCustomChannels(ctx context.Context, net *NetworkHarness,
449
450
// sender side show the individual HTLCs that arrived for it and that
450
451
// they show the correct asset amounts when decoded.
451
452
assertInvoiceHtlcAssets (
452
- t .t , charlie , invoiceResp , assetID , charlieInvoiceAmount ,
453
+ t .t , charlie , invoiceResp , assetID , nil , charlieInvoiceAmount ,
453
454
)
454
455
assertPaymentHtlcAssets (
455
- t .t , dave , invoiceResp .RHash , assetID , charlieInvoiceAmount ,
456
+ t .t , dave , invoiceResp .RHash , assetID , nil ,
457
+ charlieInvoiceAmount ,
456
458
)
457
459
458
460
charlieAssetBalance += charlieInvoiceAmount
@@ -890,7 +892,8 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
890
892
// ------------
891
893
const keySendAmount = 100
892
894
sendAssetKeySendPayment (
893
- t .t , charlie , dave , keySendAmount , assetID , fn .None [int64 ](),
895
+ t .t , charlie , dave , keySendAmount , nil , fn .None [int64 ](),
896
+ withGroupKey (groupID ),
894
897
)
895
898
logBalance (t .t , nodes , assetID , "after keysend" )
896
899
@@ -918,10 +921,11 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
918
921
// invoice.
919
922
// ------------
920
923
createAndPayNormalInvoice (
921
- t .t , charlie , dave , dave , 20_000 , assetID , withSmallShards (),
924
+ t .t , charlie , dave , dave , 20_000 , nil , withSmallShards (),
922
925
withFailure (lnrpc .Payment_FAILED , failureIncorrectDetails ),
926
+ withGroupKey (groupID ),
923
927
)
924
- logBalance (t .t , nodes , assetID , "after invoice" )
928
+ logBalance (t .t , nodes , assetID , "after failed invoice" )
925
929
926
930
// We should also be able to do a multi-hop BTC only payment, paying an
927
931
// invoice from Erin by Charlie.
@@ -935,22 +939,24 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
935
939
// ------------
936
940
const daveInvoiceAssetAmount = 2_000
937
941
invoiceResp := createAssetInvoice (
938
- t .t , charlie , dave , daveInvoiceAssetAmount , assetID ,
942
+ t .t , charlie , dave , daveInvoiceAssetAmount , nil ,
943
+ withInvGroupKey (groupID ),
939
944
)
940
945
payInvoiceWithAssets (
941
- t .t , charlie , dave , invoiceResp .PaymentRequest , assetID ,
946
+ t .t , charlie , dave , invoiceResp .PaymentRequest , nil ,
942
947
withSmallShards (),
948
+ withGroupKey (groupID ),
943
949
)
944
950
logBalance (t .t , nodes , assetID , "after invoice" )
945
951
946
952
// Make sure the invoice on the receiver side and the payment on the
947
953
// sender side show the individual HTLCs that arrived for it and that
948
954
// they show the correct asset amounts when decoded.
949
955
assertInvoiceHtlcAssets (
950
- t .t , dave , invoiceResp , assetID , daveInvoiceAssetAmount ,
956
+ t .t , dave , invoiceResp , nil , groupID , daveInvoiceAssetAmount ,
951
957
)
952
958
assertPaymentHtlcAssets (
953
- t .t , charlie , invoiceResp .RHash , assetID ,
959
+ t .t , charlie , invoiceResp .RHash , nil , groupID ,
954
960
daveInvoiceAssetAmount ,
955
961
)
956
962
@@ -961,7 +967,8 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
961
967
// Test case 4: Pay a normal invoice from Erin by Charlie.
962
968
// ------------
963
969
paidAssetAmount := createAndPayNormalInvoice (
964
- t .t , charlie , dave , erin , 20_000 , assetID , withSmallShards (),
970
+ t .t , charlie , dave , erin , 20_000 , nil , withSmallShards (),
971
+ withGroupKey (groupID ),
965
972
)
966
973
logBalance (t .t , nodes , assetID , "after invoice" )
967
974
@@ -974,7 +981,8 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
974
981
// ------------
975
982
const fabiaInvoiceAssetAmount1 = 1000
976
983
invoiceResp = createAssetInvoice (
977
- t .t , erin , fabia , fabiaInvoiceAssetAmount1 , assetID ,
984
+ t .t , erin , fabia , fabiaInvoiceAssetAmount1 , nil ,
985
+ withInvGroupKey (groupID ),
978
986
)
979
987
payInvoiceWithAssets (
980
988
t .t , charlie , dave , invoiceResp .PaymentRequest , assetID ,
@@ -1014,8 +1022,8 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
1014
1022
t .t , erin , fabia , fabiaInvoiceAssetAmount3 , assetID ,
1015
1023
)
1016
1024
payInvoiceWithAssets (
1017
- t .t , charlie , dave , invoiceResp .PaymentRequest , assetID ,
1018
- withSmallShards (),
1025
+ t .t , charlie , dave , invoiceResp .PaymentRequest , nil ,
1026
+ withSmallShards (), withGroupKey ( groupID ),
1019
1027
)
1020
1028
logBalance (t .t , nodes , assetID , "after invoice" )
1021
1029
@@ -1032,7 +1040,8 @@ func testCustomChannelsGroupedAsset(ctx context.Context, net *NetworkHarness,
1032
1040
1033
1041
const yaraInvoiceAssetAmount1 = 1000
1034
1042
invoiceResp = createAssetInvoice (
1035
- t .t , dave , yara , yaraInvoiceAssetAmount1 , assetID ,
1043
+ t .t , dave , yara , yaraInvoiceAssetAmount1 , nil ,
1044
+ withInvGroupKey (groupID ),
1036
1045
)
1037
1046
payInvoiceWithAssets (
1038
1047
t .t , charlie , dave , invoiceResp .PaymentRequest , assetID ,
@@ -1944,10 +1953,10 @@ func testCustomChannelsLiquidityEdgeCases(ctx context.Context,
1944
1953
// sender side show the individual HTLCs that arrived for it and that
1945
1954
// they show the correct asset amounts when decoded.
1946
1955
assertInvoiceHtlcAssets (
1947
- t .t , dave , invoiceResp , assetID , bigAssetAmount ,
1956
+ t .t , dave , invoiceResp , assetID , nil , bigAssetAmount ,
1948
1957
)
1949
1958
assertPaymentHtlcAssets (
1950
- t .t , charlie , invoiceResp .RHash , assetID , bigAssetAmount ,
1959
+ t .t , charlie , invoiceResp .RHash , assetID , nil , bigAssetAmount ,
1951
1960
)
1952
1961
1953
1962
// Dave sends 200k assets and 5k sats to Yara.
@@ -2908,7 +2917,8 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness,
2908
2917
charliePaidMSat , rate ,
2909
2918
).ScaleTo (0 ).ToUint64 ()
2910
2919
assertPaymentHtlcAssets (
2911
- t .t , charlie , invoiceResp .RHash , assetID , charliePaidAmount ,
2920
+ t .t , charlie , invoiceResp .RHash , assetID , nil ,
2921
+ charliePaidAmount ,
2912
2922
)
2913
2923
2914
2924
// We now make sure the asset and satoshi channel balances are exactly
0 commit comments