From b2207e88d39657359111e881aeb38cf165fb0026 Mon Sep 17 00:00:00 2001 From: enaples Date: Mon, 26 Jan 2026 16:36:23 +0100 Subject: [PATCH 1/2] tests: test reproduce #8863 --- tests/test_opening.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/test_opening.py b/tests/test_opening.py index a8090f9ac697..76b72555034d 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -17,6 +17,44 @@ def find_next_feerate(node, peer): chan = only_one(node.rpc.listpeerchannels(peer.info['id'])['channels']) return chan['next_feerate'] +@pytest.mark.openchannel('v2') +@unittest.skipIf(TEST_NETWORK != 'regtest', "requires regtest") +def test_opening_dualfund_with_unknown_feerates(node_factory, bitcoind): + """ + Test dualfund openchannel when feerates are unknown (like on signet/testnet with empty mempool). + """ + opts = { + 'ignore-fee-limits': True, + 'feerates': None, + 'dev-no-fake-fees': True, + } + + l1, l2= node_factory.get_nodes(2, opts=[opts, opts]) + + l1.fundwallet(FUNDAMOUNT) + + # Connect peers + l1.rpc.connect(l2.info['id'], 'localhost', l2.port) + + # Verify fee estimation is failing + l1.daemon.wait_for_log('Unable to estimate any fees') + l2.daemon.wait_for_log('Unable to estimate any fees') + + # Open channel l1 <-> l2 + fund_tx = l1.rpc.fundchannel(l2.info['id'], 100000, feerate='253perkw', minconf=0)['txid'] + + # Verify mempool is not empty + mempool = bitcoind.rpc.getrawmempool() + assert fund_tx in mempool and len(mempool) == 1 + + # Verify fee estimation is still failing + l1.daemon.wait_for_log('Unable to estimate any fees') + l2.daemon.wait_for_log('Unable to estimate any fees') + + # Mine blocks to confirm channels + bitcoind.generate_block(1, wait_for_mempool=1) + + l2.rpc.listpeerchannels(l1.info['id'])['channels'] @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need') @pytest.mark.openchannel('v2') From b52903491ff2c7789fb5ec7c89c45b893ec5a613 Mon Sep 17 00:00:00 2001 From: enaples Date: Mon, 26 Jan 2026 17:07:48 +0100 Subject: [PATCH 2/2] tests: test cause crash only with `experimental-dual-fund` --- tests/test_opening.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_opening.py b/tests/test_opening.py index 76b72555034d..4571fb0260b3 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -27,6 +27,7 @@ def test_opening_dualfund_with_unknown_feerates(node_factory, bitcoind): 'ignore-fee-limits': True, 'feerates': None, 'dev-no-fake-fees': True, + 'experimental-dual-fund': None } l1, l2= node_factory.get_nodes(2, opts=[opts, opts])