Skip to content

Commit b400167

Browse files
committed
Add ChannelError::close constructor
1 parent 38690bf commit b400167

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
@@ -919,6 +919,12 @@ impl fmt::Display for ChannelError {
919919
}
920920
}
921921

922+
impl ChannelError {
923+
pub(super) fn close(err: String) -> Self {
924+
ChannelError::Close(err.clone())
925+
}
926+
}
927+
922928
pub(super) struct WithChannelContext<'a, L: Deref> where L::Target: Logger {
923929
pub logger: &'a L,
924930
pub peer_id: Option<PublicKey>,

0 commit comments

Comments
 (0)