Skip to content

Commit

Permalink
Add a test for 'fundchannel_start' crash on deconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Aug 9, 2019
1 parent 710d015 commit cd32da6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cd32da6

Please sign in to comment.