Add a test for 'fundchannel_start' crash on deconnection

This commit is contained in:
darosior 2019-08-09 11:02:46 +02:00 committed by ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent cc5f2dcae3
commit b966e5e783

View File

@ -920,6 +920,7 @@ def test_funding_cancel_race(node_factory, bitcoind, executor):
def test_funding_external_wallet(node_factory, bitcoind):
l1 = node_factory.get_node()
l2 = node_factory.get_node()
l3 = node_factory.get_node()
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
assert(l1.rpc.listpeers()['peers'][0]['id'] == l2.info['id'])
@ -966,6 +967,11 @@ def test_funding_external_wallet(node_factory, bitcoind):
channel = node.rpc.listpeers()['peers'][0]['channels'][0]
assert amount * 1000 == channel['msatoshi_total']
# Test that we don't crash if peer disconnects after fundchannel_start
l2.connect(l3)
l2.rpc.fundchannel_start(l3.info["id"], amount)
l3.rpc.close(l2.info["id"])
def test_lockin_between_restart(node_factory, bitcoind):
l1 = node_factory.get_node(may_reconnect=True)