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