Expose ChannelConfig within ChannelDetails
[rust-lightning] / lightning / src / ln / channel.rs
index 9b47770f120310cce58cc01bc4ab63d1a679b590..846bfd01be843c6c60c4cdfd724bfa9e7301f71a 100644 (file)
@@ -39,7 +39,7 @@ use util::events::ClosureReason;
 use util::ser::{Readable, ReadableArgs, Writeable, Writer, VecWriter};
 use util::logger::Logger;
 use util::errors::APIError;
-use util::config::{UserConfig, LegacyChannelConfig, ChannelHandshakeConfig, ChannelHandshakeLimits};
+use util::config::{UserConfig, ChannelConfig, LegacyChannelConfig, ChannelHandshakeConfig, ChannelHandshakeLimits};
 use util::scid_utils::scid_from_parts;
 
 use io;
@@ -4491,6 +4491,12 @@ impl<Signer: Sign> Channel<Signer> {
                self.config.options.max_dust_htlc_exposure_msat
        }
 
+
+       /// Returns the current [`ChannelConfig`] applied to the channel.
+       pub fn config(&self) -> ChannelConfig {
+               self.config.options
+       }
+
        pub fn get_feerate(&self) -> u32 {
                self.feerate_per_kw
        }