From 6775c5333ef9bc661cf08335b0d93095da668533 Mon Sep 17 00:00:00 2001 From: Mariusz Klochowicz Date: Wed, 20 Sep 2023 16:29:42 -0700 Subject: [PATCH] Do not panic on attempting to force-close a subchannel We have run into this in production, it seems logging an error instead of panicking is safest. --- dlc-manager/src/manager.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlc-manager/src/manager.rs b/dlc-manager/src/manager.rs index bfef79a3..d1031745 100644 --- a/dlc-manager/src/manager.rs +++ b/dlc-manager/src/manager.rs @@ -129,7 +129,10 @@ macro_rules! check_for_timed_out_channels { let is_timed_out = timeout < $manager.time.unix_time_now(); if is_timed_out { let sub_channel = if channel.is_sub_channel() { - unimplemented!(); + error!("Force-closing subchannels is not supported; skipping closure."); + continue; + + // TODO: Implement subchannel force closing // let s = get_sub_channel_in_state!( // $manager, // channel.channel_id,