status: separate types for peer failure vs "impossible" failures.

Ideally we'd rename status_failed() to status_fatal(), but that's
too much churn for now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-02-08 11:55:12 +10:30
committed by Christian Decker
parent fd498be7ca
commit cc9ca82821
12 changed files with 228 additions and 151 deletions

View File

@@ -3155,7 +3155,7 @@ class LightningDTests(BaseLightningDTests):
# L1 asks for stupid low fees
l1.rpc.dev_setfees(15)
l1.daemon.wait_for_log('STATUS_FAIL_PEER_BAD:.*update_fee 15 outside range 4250-75000')
l1.daemon.wait_for_log('Peer permanent failure in CHANNELD_NORMAL: lightning_channeld: received ERROR channel .*: update_fee 15 outside range 4250-75000')
# Make sure the resolution of this one doesn't interfere with the next!
# Note: may succeed, may fail with insufficient fee, depending on how
# bitcoind feels!
@@ -3302,7 +3302,7 @@ class LightningDTests(BaseLightningDTests):
# Make l2 upset by asking for crazy fee.
l1.rpc.dev_setfees('150000')
# Wait for l1 notice
l1.daemon.wait_for_log('STATUS_FAIL_PEER_BAD')
l1.daemon.wait_for_log(r'Peer permanent failure in CHANNELD_NORMAL: lightning_channeld: received ERROR channel .*: update_fee 150000 outside range 4250-75000')
# Can't pay while its offline.
self.assertRaises(ValueError, l1.rpc.sendpay, to_json(route), rhash)