From 0dde74f99e25de0ced39f6c14494f24ff35a4aa8 Mon Sep 17 00:00:00 2001 From: niftynei Date: Fri, 2 Jul 2021 15:21:54 -0500 Subject: [PATCH] channeld: don't forget channels that we've put funds into Typically we forget a channel if 2016 blocks have passed and the funding transaction hasn't been mined yet, however we SHOULD NOT forget these channels if we've got funds in them! --- lightningd/channel_control.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lightningd/channel_control.c b/lightningd/channel_control.c index 02d0f4b42..18c47e82a 100644 --- a/lightningd/channel_control.c +++ b/lightningd/channel_control.c @@ -773,6 +773,10 @@ is_fundee_should_forget(struct lightningd *ld, if (block_height - channel->first_blocknum < max_funding_unconfirmed) return false; + /* If we've got funds in the channel, don't forget it */ + if (!amount_sat_zero(channel->our_funds)) + return false; + /* Ah forget it! */ return true; }