core-lightning/tests
Rusty Russell 36b1cac6e6 lightningd: new state AWAITING_UNILATERAL.
When in this state, we send a canned error "Awaiting unilateral close".
We enter this both when we drop to chain, and when we're trying to get
them to drop to chain due to option_data_loss_protect.

As this state (unlike channel errors) is saved to the database, it means
we will *never* talk to a peer again in this state, so they can't
confuse us.

Since we set this state in channel_fail_permanent() (which is the only
place we call drop_to_chain for a unilateral close), we don't need to
save to the db: channel_set_state() does that for us.

This state change has a subtle effect: we return WIRE_UNKNOWN_NEXT_PEER
instead of WIRE_TEMPORARY_CHANNEL_FAILURE as soon as we get a failure
with a peer.  To provoke a temporary failure in test_pay_disconnect we
take the node offline.

Reported-by: Christian Decker @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-23 14:46:22 +02:00
..
benchmark.py pytest: Remove test_lightningd and all the legacy testing framework 2018-08-07 00:54:19 +00:00
conftest.py pytest: Pass result to fixtures and keep directories of failed tests 2018-08-07 00:54:19 +00:00
fixtures.py pytest: fail if we see 'bad reestablish' in the logs. 2018-08-23 14:46:22 +02:00
requirements.txt test: add pytest-xdist to the python test requirements 2018-07-26 23:18:37 +02:00
test_closing.py pytest: fix race in test_closing_different_fees 2018-08-21 00:48:02 +02:00
test_connection.py lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +02:00
test_gossip.py connectd: iterate through all known addresses for a peer, not just one. 2018-08-10 12:46:45 +02:00
test_invoices.py pytest: Move invoice-related tests into their own file 2018-08-07 00:54:19 +00:00
test_misc.py log: Append the current time to the crash log filename 2018-08-23 12:51:08 +02:00
test_pay.py lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +02:00
utils.py common: log when we toggle IO logging, don't edit env in tests! 2018-08-23 14:46:22 +02:00