Browse Source

df-tests: test_channel_state_changed_unilateral

ppa
niftynei 4 years ago
committed by Christian Decker
parent
commit
609d509ca5
  1. 15
      tests/test_plugin.py

15
tests/test_plugin.py

@ -820,10 +820,23 @@ def test_channel_state_changed_unilateral(node_factory, bitcoind):
return event
event2 = wait_for_event(l2)
if l2.config('experimental-dual-fund'):
assert(event2['peer_id'] == l1_id)
assert(event2['channel_id'] == cid)
assert(event2['short_channel_id'] is None)
assert(event2['old_state'] == "DUALOPEND_OPEN_INIT")
assert(event2['new_state'] == "DUALOPEND_AWAITING_LOCKIN")
assert(event2['cause'] == "remote")
assert(event2['message'] == "Sigs exchanged, waiting for lock-in")
event2 = wait_for_event(l2)
assert(event2['peer_id'] == l1_id) # we only test these IDs the first time
assert(event2['channel_id'] == cid)
assert(event2['short_channel_id'] == scid)
assert(event2['old_state'] == "CHANNELD_AWAITING_LOCKIN")
if l2.config('experimental-dual-fund'):
assert(event2['old_state'] == "DUALOPEND_AWAITING_LOCKIN")
else:
assert(event2['old_state'] == "CHANNELD_AWAITING_LOCKIN")
assert(event2['new_state'] == "CHANNELD_NORMAL")
assert(event2['cause'] == "remote")
assert(event2['message'] == "Lockin complete")

Loading…
Cancel
Save