Skip to content

Commit 73bc0f6

Browse files
committed
Add ChannelError::close constructor
1 parent 1d0c6c6 commit 73bc0f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ impl fmt::Display for ChannelError {
733733
}
734734
}
735735

736+
impl ChannelError {
737+
pub(super) fn close(err: String) -> Self {
738+
ChannelError::Close(err.clone())
739+
}
740+
}
741+
736742
pub(super) struct WithChannelContext<'a, L: Deref> where L::Target: Logger {
737743
pub logger: &'a L,
738744
pub peer_id: Option<PublicKey>,

0 commit comments

Comments
 (0)