mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
pytest: fix flaky wait_for_log() in test_funder_feerate_reconnect.
The comment was wrong: the channel being locked in was triggering the fee update and hence the disconnect. But that can actually happen before fund_channel returns, as that waits for the gossipd to see the channel active. Best to do the fee update manually, so it's exactly what we want. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7925469f88
commit
b5ae4c12c7
@ -1160,13 +1160,14 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
|
||||
def test_funder_feerate_reconnect(node_factory, bitcoind):
|
||||
# l1 updates fees, then reconnect so l2 retransmits commitment_signed.
|
||||
disconnects = ['-WIRE_COMMITMENT_SIGNED']
|
||||
l1 = node_factory.get_node(may_reconnect=True)
|
||||
l1 = node_factory.get_node(may_reconnect=True,
|
||||
feerates=(7500, 7500, 7500))
|
||||
l2 = node_factory.get_node(disconnect=disconnects, may_reconnect=True)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.fund_channel(l2, 10**6)
|
||||
|
||||
# lockin will cause fee update, causing disconnect.
|
||||
bitcoind.generate_block(5)
|
||||
# create fee update, causing disconnect.
|
||||
l1.set_feerates((15000, 7500, 3750))
|
||||
l2.daemon.wait_for_log('dev_disconnect: \-WIRE_COMMITMENT_SIGNED')
|
||||
|
||||
# Wait until they reconnect.
|
||||
|
Loading…
Reference in New Issue
Block a user