Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: restore dual-funding tests. #6273

Merged
merged 7 commits into from
May 29, 2023
Prev Previous commit
Next Next commit
pytest: update test_v2_fail_second for listpeers changes.
Now should use listpeerchannels, since listpeers['channels'] is
deprecated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed May 23, 2023
commit 75620f7938aced7f4026fd7da59560d08afedb68
10 changes: 7 additions & 3 deletions tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def test_v2_fail_second(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, wait_for_announce=True)

# Should have one channel between them.
only_one(only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['channels'])
only_one(l1.rpc.listpeerchannels(l2.info['id'])['channels'])

amount = 2**24 - 1
l1.fundwallet(amount + 10000000)
Expand All @@ -209,16 +209,20 @@ def test_v2_fail_second(node_factory, bitcoind):
psbt = l1.rpc.fundpsbt(amount, '253perkw', 250, reserve=0)['psbt']
start = l1.rpc.openchannel_init(l2.info['id'], amount, psbt)

# They will both see a pair of channels
assert len(l1.rpc.listpeerchannels(l2.info['id'])['channels']) == 2
assert len(l2.rpc.listpeerchannels(l1.info['id'])['channels']) == 2

# We can abort a channel
l1.rpc.openchannel_abort(start['channel_id'])

peer_info = only_one(l1.rpc.listpeers(l2.info['id'])['peers'])
# We should have deleted the 'in-progress' channel info
only_one(peer_info['channels'])
only_one(l1.rpc.listpeerchannels(l2.info['id'])['channels'])

# FIXME: check that tx-abort was sent
# Should be able to reattempt without reconnecting
start = l1.rpc.openchannel_init(l2.info['id'], amount, psbt)
assert len(l1.rpc.listpeerchannels(l2.info['id'])['channels']) == 2


@unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd doesnt yet support PSBT features we need')
Expand Down