mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
pytest: fix flake in test_reconnect_sender_add1
l1 might split in a commitment_signed before it notices the disconnect, and this test fails: ``` for i in range(0, len(disconnects)): with pytest.raises(RpcError): l1.rpc.sendpay(route, rhash, payment_secret=inv['payment_secret']) > l1.rpc.waitsendpay(rhash) E Failed: DID NOT RAISE <class 'pyln.client.lightning.RpcError'> ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d042cbc344
commit
e366cb17f6
1 changed files with 2 additions and 0 deletions
|
@ -643,12 +643,14 @@ def test_reconnect_normal(node_factory):
|
||||||
@pytest.mark.openchannel('v2')
|
@pytest.mark.openchannel('v2')
|
||||||
def test_reconnect_sender_add1(node_factory):
|
def test_reconnect_sender_add1(node_factory):
|
||||||
# Fail after add is OK, will cause payment failure though.
|
# Fail after add is OK, will cause payment failure though.
|
||||||
|
# Make sure it doesn't send commit before it sees disconnect though.
|
||||||
disconnects = ['-WIRE_UPDATE_ADD_HTLC',
|
disconnects = ['-WIRE_UPDATE_ADD_HTLC',
|
||||||
'+WIRE_UPDATE_ADD_HTLC']
|
'+WIRE_UPDATE_ADD_HTLC']
|
||||||
|
|
||||||
# Feerates identical so we don't get gratuitous commit to update them
|
# Feerates identical so we don't get gratuitous commit to update them
|
||||||
l1 = node_factory.get_node(disconnect=disconnects,
|
l1 = node_factory.get_node(disconnect=disconnects,
|
||||||
may_reconnect=True,
|
may_reconnect=True,
|
||||||
|
options={'commit-time': 2000},
|
||||||
feerates=(7500, 7500, 7500, 7500))
|
feerates=(7500, 7500, 7500, 7500))
|
||||||
l2 = node_factory.get_node(may_reconnect=True)
|
l2 = node_factory.get_node(may_reconnect=True)
|
||||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||||
|
|
Loading…
Add table
Reference in a new issue