From 73bc0f61b912ab0617c77192328faedc4abf1502 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 5 May 2024 23:10:39 +0000 Subject: [PATCH] Add `ChannelError::close` constructor --- lightning/src/ln/channel.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.39.5