Skip to content

Commit 4f78529

Browse files
committed
Revert "fixup test races due to feature negotiation, change output cost"
This reverts commit cc3820e.
1 parent 0da690f commit 4f78529

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

tests/test_bookkeeper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,13 @@ def _check_events(node, channel_id, exp_events):
399399

400400
# l1 events
401401
exp_events = [('channel_open', open_amt * 1000 + lease_fee, 0),
402-
('onchain_fee', 1320000, 0),
402+
('onchain_fee', 1224000, 0),
403403
('lease_fee', 0, lease_fee),
404404
('journal_entry', 0, invoice_msat)]
405405
_check_events(l1, channel_id, exp_events)
406406

407407
exp_events = [('channel_open', open_amt * 1000, 0),
408-
('onchain_fee', 892000, 0),
408+
('onchain_fee', 796000, 0),
409409
('lease_fee', lease_fee, 0),
410410
('journal_entry', invoice_msat, 0)]
411411
_check_events(l2, channel_id, exp_events)

tests/test_closing.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
scriptpubkey_addr, calc_lease_fee,
99
check_utxos_channel, anchor_expected, check_coin_moves,
1010
check_balance_snaps, mine_funding_to_announce, check_inspect_channel,
11-
first_scid, expected_peer_features
11+
first_scid
1212
)
1313

1414
import os
@@ -1064,9 +1064,6 @@ def test_channel_lease_lessor_cheat(node_factory, bitcoind, chainparams):
10641064
# start l2 and force close channel with l1 while l1 is still offline
10651065
l2.start()
10661066
sync_blockheight(bitcoind, [l2])
1067-
# wait for reconnect, otherwise anysegwit feature bits won't be known
1068-
wait_for(lambda: len(l2.rpc.listpeers()['peers']) == 1)
1069-
wait_for(lambda: l2.rpc.listpeers()['peers'][0].get('features', "") == expected_peer_features())
10701067
l2.rpc.close(l1.info['id'], 1, force_lease_closed=True)
10711068
bitcoind.generate_block(1, wait_for_mempool=1)
10721069

@@ -1144,9 +1141,6 @@ def test_channel_lease_lessee_cheat(node_factory, bitcoind, chainparams):
11441141
# start l1 and force close channel with l2 while l2 is still offline
11451142
l1.start()
11461143
sync_blockheight(bitcoind, [l1])
1147-
# wait for reconnect, otherwise anysegwit feature bits won't be known
1148-
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 1)
1149-
wait_for(lambda: l1.rpc.listpeers()['peers'][0].get('features', "") == expected_peer_features())
11501144
l1.rpc.close(l2.info['id'], 1, force_lease_closed=True)
11511145
bitcoind.generate_block(1, wait_for_mempool=1)
11521146

tests/test_connection.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,10 +792,6 @@ def test_reconnect_no_update(node_factory, executor, bitcoind):
792792

793793
# For closingd reconnection
794794
l1.daemon.start()
795-
# wait for reconnect, otherwise anysegwit feature bits won't be known
796-
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 1)
797-
wait_for(lambda: l1.rpc.listpeers()['peers'][0].get('features', "") == expected_peer_features())
798-
799795
# Close will trigger the -WIRE_SHUTDOWN and we then wait for the
800796
# automatic reconnection to trigger the retransmission.
801797
l1.rpc.close(l2.info['id'], 0)

tests/test_opening.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
from fixtures import TEST_NETWORK
33
from pyln.client import RpcError, Millisatoshi
44
from utils import (
5-
only_one, wait_for, sync_blockheight, first_channel_id,
6-
calc_lease_fee, check_coin_moves, anchor_expected, expected_peer_features
5+
only_one, wait_for, sync_blockheight, first_channel_id, calc_lease_fee, check_coin_moves, anchor_expected
76
)
87

98
from pathlib import Path
@@ -1635,8 +1634,6 @@ def test_v2_replay_bookkeeping(node_factory, bitcoind):
16351634
ev_tags = [e['tag'] for e in l1.rpc.bkpr_listaccountevents(chan_id)['events']]
16361635
assert 'lease_fee' in ev_tags
16371636

1638-
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 1)
1639-
wait_for(lambda: l1.rpc.listpeers()['peers'][0].get('features', "") == expected_peer_features())
16401637
l1.rpc.close(l2.info['id'], 1)
16411638
bitcoind.generate_block(6, wait_for_mempool=1)
16421639

tests/test_plugin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,6 @@ def test_coin_movement_notices(node_factory, bitcoind, chainparams):
20562056
chanid_1 = first_channel_id(l2, l1)
20572057
chanid_3 = first_channel_id(l2, l3)
20582058

2059-
# Wait until we have the expected features loaded before sending to taproot address
2060-
wait_for(lambda: len(l2.rpc.listpeers()['peers']) == 2)
2061-
wait_for(lambda: [x.get("features", None) for x in l2.rpc.listpeers()['peers']] == [expected_peer_features()] * 2)
20622059
l2.rpc.close(chan1)
20632060
l2.daemon.wait_for_logs([
20642061
' to CLOSINGD_COMPLETE',

0 commit comments

Comments
 (0)