mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
test_lightningd: rename has_failed to allow_failure.
Note that it should really be a flag to daemon on construction, too, but that may interfere with another concurrent branch so I've deferred. Suggested-by: Christian Decker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -740,7 +740,7 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
|
|
||||||
l2.daemon.wait_for_log('-> ONCHAIND_CHEATED')
|
l2.daemon.wait_for_log('-> ONCHAIND_CHEATED')
|
||||||
# FIXME: l1 should try to stumble along!
|
# FIXME: l1 should try to stumble along!
|
||||||
l1.has_failed()
|
l1.allow_failure()
|
||||||
|
|
||||||
# l2 should spend all of the outputs (except to-us).
|
# l2 should spend all of the outputs (except to-us).
|
||||||
# Could happen in any order, depending on commitment tx.
|
# Could happen in any order, depending on commitment tx.
|
||||||
@@ -802,7 +802,7 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
|
|
||||||
l2.daemon.wait_for_log('-> ONCHAIND_CHEATED')
|
l2.daemon.wait_for_log('-> ONCHAIND_CHEATED')
|
||||||
# FIXME: l1 should try to stumble along!
|
# FIXME: l1 should try to stumble along!
|
||||||
l1.has_failed()
|
l1.allow_failure()
|
||||||
|
|
||||||
# l2 should spend all of the outputs (except to-us).
|
# l2 should spend all of the outputs (except to-us).
|
||||||
# Could happen in any order, depending on commitment tx.
|
# Could happen in any order, depending on commitment tx.
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ class LightningNode(object):
|
|||||||
db.close()
|
db.close()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def has_failed(self):
|
# FIXME: we should flag daemon on startup, suppress error
|
||||||
|
def allow_failure(self):
|
||||||
"""Note that a daemon has (deliberately) crashed, so we don't fail
|
"""Note that a daemon has (deliberately) crashed, so we don't fail
|
||||||
on cleanup"""
|
on cleanup"""
|
||||||
self.known_fail = True
|
self.known_fail = True
|
||||||
|
|||||||
Reference in New Issue
Block a user