From: Matt Corallo Date: Sun, 5 May 2024 23:10:39 +0000 (+0000) Subject: Add `ChannelError::close` constructor X-Git-Tag: v0.0.124-beta~88^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=73bc0f61b912ab0617c77192328faedc4abf1502;p=rust-lightning Add `ChannelError::close` constructor --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 716eba7cf..14ebc663f 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -733,6 +733,12 @@ impl fmt::Display for ChannelError { } } +impl ChannelError { + pub(super) fn close(err: String) -> Self { + ChannelError::Close(err.clone()) + } +} + pub(super) struct WithChannelContext<'a, L: Deref> where L::Target: Logger { pub logger: &'a L, pub peer_id: Option,