servo: clightning-sane: log before we give up

This commit is contained in:
Colin 2024-01-13 01:10:52 +00:00
parent 2f1e354400
commit 6b5cdd7508

View File

@ -475,7 +475,9 @@ class LoopBalancer(AbstractLoopRunner):
self.route_fail_count = 0
def pop_job(self) -> LoopJob | None:
if self.tx_fail_count + self.route_fail_count >= MAX_SEQUENTIAL_JOB_FAILURES: return None
if self.tx_fail_count + self.route_fail_count >= MAX_SEQUENTIAL_JOB_FAILURES:
logger.info("too many sequential failures: giving up")
return None
amount_avail = self.amount_target - self.amount_looped - self.amount_outstanding
if amount_avail < self.bounds.min_msat: return None