Skip to content

Commit e304a4e

Browse files
committed
fixup tests
1 parent 1c203aa commit e304a4e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

tests/test_bookkeeper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ 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', 1224000, 0),
402+
('onchain_fee', 1320000, 0),
403403
('lease_fee', 0, lease_fee),
404404
('journal_entry', 0, invoice_msat)]
405405
_check_events(l1, channel_id, exp_events)

tests/test_closing.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,9 @@ def test_channel_lease_lessor_cheat(node_factory, bitcoind, chainparams):
10701070
# start l2 and force close channel with l1 while l1 is still offline
10711071
l2.start()
10721072
sync_blockheight(bitcoind, [l2])
1073+
# wait for reconnect, otherwise anysegwit feature bits won't be known
1074+
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 1)
1075+
wait_for(lambda: l1.rpc.listpeers()['peers'][0].get('features', "") == '08a0000a0269a2')
10731076
l2.rpc.close(l1.info['id'], 1, force_lease_closed=True)
10741077
bitcoind.generate_block(1, wait_for_mempool=1)
10751078

@@ -1147,6 +1150,9 @@ def test_channel_lease_lessee_cheat(node_factory, bitcoind, chainparams):
11471150
# start l1 and force close channel with l2 while l2 is still offline
11481151
l1.start()
11491152
sync_blockheight(bitcoind, [l1])
1153+
# wait for reconnect, otherwise anysegwit feature bits won't be known
1154+
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 1)
1155+
wait_for(lambda: l1.rpc.listpeers()['peers'][0].get('features', "") == '08a0000a0269a2')
11501156
l1.rpc.close(l2.info['id'], 1, force_lease_closed=True)
11511157
bitcoind.generate_block(1, wait_for_mempool=1)
11521158

tests/test_connection.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,10 @@ 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', "") == '08a0000a0269a2')
798+
795799
# Close will trigger the -WIRE_SHUTDOWN and we then wait for the
796800
# automatic reconnection to trigger the retransmission.
797801
l1.rpc.close(l2.info['id'], 0)

0 commit comments

Comments
 (0)