Description
If in litd_custom_channels_test.go
I make the following change
$ git diff
diff --git a/itest/litd_custom_channels_test.go b/itest/litd_custom_channels_test.go
index e6d3801..2e7eb30 100644
--- a/itest/litd_custom_channels_test.go
+++ b/itest/litd_custom_channels_test.go
@@ -46,7 +46,7 @@ var (
AssetType: taprpc.AssetType_NORMAL,
Name: "itest-asset-cents",
AssetMeta: dummyMetaData,
- Amount: 1_000_000,
+ Amount: 2_000_000,
}
shortTimeout = time.Second * 5
@@ -1874,7 +1874,7 @@ func testCustomChannelsLiquidityEdgeCases(ctx context.Context,
t.Logf("Universes synced between all nodes, distributing assets...")
const (
- daveFundingAmount = uint64(400_000)
+ daveFundingAmount = uint64(800_000)
erinFundingAmount = uint64(200_000)
)
charlieFundingAmount := cents.Amount - uint64(2*400_000)
$
and then run
make itest icase=test_custom_channels_liquidity
I get the error
test_harness.go:107: Opening asset channels...
test_harness.go:107: Funded channel between Charlie and Dave: txid:"4cb5b6d8cb390870186cb4c5fc05505996addf52c385bbb45b71e1a93037cb30"
assets_test.go:168:
Error Trace: /zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/assets_test.go:168
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/litd_custom_channels_test.go:1882
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/test_harness.go:103
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/litd_test.go:102
Error: Received unexpected error:
rpc error: code = Unknown desc = error funding channel: unable to fund vPacket: unable to select coins: failed to find coin(s) that satisfy given constraints; if previous transfers are un-confirmed, wait for them to confirm before trying again
Test: TestLightningTerminal/test_custom_channels_liquidity
test_harness.go:172:
Error Trace: /zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/test_harness.go:193
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/test_harness.go:172
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/assertions.go:177
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/assertions.go:123
/usr/lib/go-1.23/src/runtime/panic.go:629
/usr/lib/go-1.23/src/testing/testing.go:1006
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/assets_test.go:168
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/litd_custom_channels_test.go:1882
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/test_harness.go:103
/zziigguurraatt/git/lightning-terminal-projects/mint_asset_test/itest/litd_test.go:102
Error: Received unexpected error:
wanted 1, found 2 txs in mempool: [4cb5b6d8cb390870186cb4c5fc05505996addf52c385bbb45b71e1a93037cb30 faba8adff40711093c2035586223f0cda71f7fef67d3314818a7724173f77d27]
Test: TestLightningTerminal/test_custom_channels_liquidity
Messages: unable to find txns in mempool
itest error from [node:Bob]: receive topology client stream got err:graph subscription err: rpc error: code = Unknown desc = malformed header: missing HTTP content-type
harness.go:444: finished test: , start height=438, end height=488, mined blocks=50
harness.go:450: test failed, skipped cleanup
=== NAME TestLightningTerminal
litd_test.go:116: Failure time: 2025-03-10 10:48:16.400
--- FAIL: TestLightningTerminal (96.15s)
--- FAIL: TestLightningTerminal/test_custom_channels_liquidity (96.15s)
FAIL
make: *** [Makefile:226: itest-only] Error 255
I think maybe the proper amount of coins isn't be distributed to the nodes before trying to open channels or maybe it is just not waiting for transactions to propagate to the mempool and confirm before attempting to proceed, but I'm not sure how itest sets up its test network. It should be smart enough to make sure each node has the right amount of assets before trying to open up channels though.
I've randomly get this issue in https://github.com/lightninglabs/tapdvalidation when I do have enough coins in the wallet of each node (I know this because it is random and works 90% of the time), but now I've been able to make it reproducible in the itest framework. I'm not sure if it is the same problem or a different one with the same error message, but it would be good to fix it in itest since it is at least a reproducible error there.