Skip to content

Commit d2ff63c

Browse files
GeorgeTsagkjtobin
andcommitted
itest: scope down asset in decode-payreq itest
Changes the itest asset used in the decode payreq itest to instead be a new variable declared within the scope of the itest. This prevents mutating the global asset that is re-used by other test cases and would lead to failures otherwise. Thanks @jtobin for spotting. Co-authored-by: Jared Tobin <jared@jtobin.io>
1 parent 5406373 commit d2ff63c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

itest/litd_custom_channels_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3766,7 +3766,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness,
37663766
}
37673767

37683768
const decimalDisplay = 6
3769-
itestAsset = &mintrpc.MintAsset{
3769+
tcAsset := &mintrpc.MintAsset{
37703770
AssetType: taprpc.AssetType_NORMAL,
37713771
Name: "USD",
37723772
AssetMeta: usdMetaData,
@@ -3862,7 +3862,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness,
38623862
t.t, t.lndHarness.Miner.Client, charlieTap,
38633863
[]*mintrpc.MintAssetRequest{
38643864
{
3865-
Asset: itestAsset,
3865+
Asset: tcAsset,
38663866
},
38673867
},
38683868
)
@@ -4648,7 +4648,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
46484648
}
46494649

46504650
const decimalDisplay = 6
4651-
itestAsset = &mintrpc.MintAsset{
4651+
tcAsset := &mintrpc.MintAsset{
46524652
AssetType: taprpc.AssetType_NORMAL,
46534653
Name: "USD",
46544654
AssetMeta: usdMetaData,
@@ -4664,7 +4664,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context,
46644664
t.t, t.lndHarness.Miner.Client, aliceTap,
46654665
[]*mintrpc.MintAssetRequest{
46664666
{
4667-
Asset: itestAsset,
4667+
Asset: tcAsset,
46684668
},
46694669
},
46704670
)

0 commit comments

Comments
 (0)