From 298ac07929a4ec987f6c1ec7339606a4b28e97b3 Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Wed, 26 Jun 2024 14:08:53 +0300 Subject: [PATCH 1/2] wait for channel to be swept before marking as closed --- libs/sdk-core/src/greenlight/node_api.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/sdk-core/src/greenlight/node_api.rs b/libs/sdk-core/src/greenlight/node_api.rs index 32cf4a156..66ac2d8ed 100644 --- a/libs/sdk-core/src/greenlight/node_api.rs +++ b/libs/sdk-core/src/greenlight/node_api.rs @@ -2188,7 +2188,6 @@ impl From for Channel { ChannelState::PendingOpen } ChanneldNormal => ChannelState::Opened, - Onchain => ChannelState::Closed, _ => ChannelState::PendingClose, }; From 1adada037c181eb9f4ac09a4e272a091ed8eccfa Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Wed, 26 Jun 2024 14:26:30 +0300 Subject: [PATCH 2/2] fix test --- libs/sdk-core/src/greenlight/node_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-core/src/greenlight/node_api.rs b/libs/sdk-core/src/greenlight/node_api.rs index 66ac2d8ed..92efab6cb 100644 --- a/libs/sdk-core/src/greenlight/node_api.rs +++ b/libs/sdk-core/src/greenlight/node_api.rs @@ -2435,7 +2435,7 @@ mod tests { } let c: models::Channel = cln_channel(&Onchain).into(); - assert_eq!(c.state, models::ChannelState::Closed); + assert_eq!(c.state, models::ChannelState::PendingClose); Ok(()) }