Skip to content

Commit 2a42125

Browse files
committed
pytest: fix flake in test_rbf_to_chain_before_commit
Once we speed things up, this can receive COMMITMENT_SIGNED, and hence succeed. Let's drop on receive, not send! ``` 2025-05-06T06:07:51.5997333Z # Peers try RBF, break on initial COMMITMENT_SIGNED 2025-05-06T06:07:51.5997855Z bump = l1.rpc.openchannel_bump(chan_id, chan_amount, initpsbt['psbt']) 2025-05-06T06:07:51.5998214Z > with pytest.raises(RpcError): 2025-05-06T06:07:51.5998542Z E Failed: DID NOT RAISE <class 'pyln.client.lightning.RpcError'> ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 86e5b14 commit 2a42125

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/test_opening.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,14 +1060,13 @@ def test_rbf_reconnect_tx_sigs(node_factory, bitcoind, chainparams):
10601060
@unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need')
10611061
@pytest.mark.openchannel('v2')
10621062
def test_rbf_to_chain_before_commit(node_factory, bitcoind, chainparams):
1063-
disconnects = ['=WIRE_TX_ADD_INPUT', # Initial funding succeeds
1064-
'=WIRE_COMMITMENT_SIGNED',
1063+
disconnects = ['=WIRE_COMMITMENT_SIGNED',
10651064
'-WIRE_COMMITMENT_SIGNED']
10661065
l1, l2 = node_factory.get_nodes(2,
1067-
opts=[{'disconnect': disconnects,
1068-
'may_reconnect': True,
1066+
opts=[{'may_reconnect': True,
10691067
'dev-no-reconnect': None},
1070-
{'may_reconnect': True,
1068+
{'disconnect': disconnects,
1069+
'may_reconnect': True,
10711070
'dev-no-reconnect': None}])
10721071

10731072
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)

0 commit comments

Comments
 (0)