From d2ff63cc812b8215dfb5750ee87faaeb119959f6 Mon Sep 17 00:00:00 2001 From: George Tsagkarelis Date: Tue, 14 Oct 2025 15:59:01 +0200 Subject: [PATCH] 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 --- itest/litd_custom_channels_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/itest/litd_custom_channels_test.go b/itest/litd_custom_channels_test.go index cc16305b..ca0a7eeb 100644 --- a/itest/litd_custom_channels_test.go +++ b/itest/litd_custom_channels_test.go @@ -3766,7 +3766,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness, } const decimalDisplay = 6 - itestAsset = &mintrpc.MintAsset{ + tcAsset := &mintrpc.MintAsset{ AssetType: taprpc.AssetType_NORMAL, Name: "USD", AssetMeta: usdMetaData, @@ -3862,7 +3862,7 @@ func testCustomChannelsOraclePricing(ctx context.Context, net *NetworkHarness, t.t, t.lndHarness.Miner.Client, charlieTap, []*mintrpc.MintAssetRequest{ { - Asset: itestAsset, + Asset: tcAsset, }, }, ) @@ -4648,7 +4648,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context, } const decimalDisplay = 6 - itestAsset = &mintrpc.MintAsset{ + tcAsset := &mintrpc.MintAsset{ AssetType: taprpc.AssetType_NORMAL, Name: "USD", AssetMeta: usdMetaData, @@ -4664,7 +4664,7 @@ func testCustomChannelsDecodeAssetInvoice(ctx context.Context, t.t, t.lndHarness.Miner.Client, aliceTap, []*mintrpc.MintAssetRequest{ { - Asset: itestAsset, + Asset: tcAsset, }, }, )