Browse Source

test_lightningd.py: test lockin while we're not running.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
e66bd25b5c
  1. 21
      tests/test_lightningd.py

21
tests/test_lightningd.py

@ -2502,6 +2502,27 @@ class LightningDTests(BaseLightningDTests):
amount = amount-1
l1.rpc.fundchannel(l2.info['id'], amount)
def test_lockin_between_restart(self):
l1 = self.node_factory.get_node()
l2 = self.node_factory.get_node(options=['--anchor-confirms=3'])
l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port'])
self.give_funds(l1, 10**6 + 1000000)
l1.rpc.fundchannel(l2.info['id'], 10**6)['tx']
# l1 goes down.
l1.stop()
# Now 120 blocks go by...
bitcoind.generate_block(120)
# Restart
l1.daemon.start()
# All should be good.
l1.daemon.wait_for_log('-> CHANNELD_NORMAL')
l2.daemon.wait_for_log('-> CHANNELD_NORMAL')
def test_addfunds_from_block(self):
"""Send funds to the daemon without telling it explicitly
"""

Loading…
Cancel
Save