Skip to content

Commit

Permalink
Merge pull request #1024 from breez/fix-channel-state
Browse files Browse the repository at this point in the history
Wait for channel to be swept before marking as closed
  • Loading branch information
roeierez authored Jun 27, 2024
2 parents 9d44ddd + 1adada0 commit 156f7a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/sdk-core/src/greenlight/node_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,6 @@ impl From<cln::ListpeersPeersChannels> for Channel {
ChannelState::PendingOpen
}
ChanneldNormal => ChannelState::Opened,
Onchain => ChannelState::Closed,
_ => ChannelState::PendingClose,
};

Expand Down Expand Up @@ -2436,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(())
}
Expand Down

0 comments on commit 156f7a4

Please sign in to comment.