&'chan_mon_cfg test_utils::TestLogger,
>;
+#[cfg(not(feature = "dnssec"))]
type TestOnionMessenger<'chan_man, 'node_cfg, 'chan_mon_cfg> = OnionMessenger<
DedicatedEntropy,
&'node_cfg test_utils::TestKeysInterface,
&'node_cfg test_utils::TestMessageRouter<'chan_mon_cfg>,
&'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
&'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
- IgnoringMessageHandler, // TODO: Swap for ChannelManager (when built with the "dnssec" feature)
+ IgnoringMessageHandler,
+ IgnoringMessageHandler,
+>;
+
+#[cfg(feature = "dnssec")]
+type TestOnionMessenger<'chan_man, 'node_cfg, 'chan_mon_cfg> = OnionMessenger<
+ DedicatedEntropy,
+ &'node_cfg test_utils::TestKeysInterface,
+ &'chan_mon_cfg test_utils::TestLogger,
+ &'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
+ &'node_cfg test_utils::TestMessageRouter<'chan_mon_cfg>,
+ &'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
+ &'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
+ &'chan_man TestChannelManager<'node_cfg, 'chan_mon_cfg>,
IgnoringMessageHandler,
>;
for i in 0..node_count {
let dedicated_entropy = DedicatedEntropy(RandomBytes::new([i as u8; 32]));
+ #[cfg(feature = "dnssec")]
+ let onion_messenger = OnionMessenger::new(
+ dedicated_entropy, cfgs[i].keys_manager, cfgs[i].logger, &chan_mgrs[i],
+ &cfgs[i].message_router, &chan_mgrs[i], &chan_mgrs[i], &chan_mgrs[i],
+ IgnoringMessageHandler {},
+ );
+ #[cfg(not(feature = "dnssec"))]
let onion_messenger = OnionMessenger::new(
dedicated_entropy, cfgs[i].keys_manager, cfgs[i].logger, &chan_mgrs[i],
&cfgs[i].message_router, &chan_mgrs[i], &chan_mgrs[i], IgnoringMessageHandler {},
/// [`SimpleArcChannelManager`]: crate::ln::channelmanager::SimpleArcChannelManager
/// [`SimpleArcPeerManager`]: crate::ln::peer_handler::SimpleArcPeerManager
#[cfg(not(c_bindings))]
+#[cfg(feature = "dnssec")]
pub type SimpleArcOnionMessenger<M, T, F, L> = OnionMessenger<
Arc<KeysManager>,
Arc<KeysManager>,
Arc<DefaultMessageRouter<Arc<NetworkGraph<Arc<L>>>, Arc<L>, Arc<KeysManager>>>,
Arc<SimpleArcChannelManager<M, T, F, L>>,
Arc<SimpleArcChannelManager<M, T, F, L>>,
- IgnoringMessageHandler, // TODO: Swap for ChannelManager (when built with the "dnssec" feature)
+ Arc<SimpleArcChannelManager<M, T, F, L>>,
+ IgnoringMessageHandler
+>;
+
+/// Useful for simplifying the parameters of [`SimpleArcChannelManager`] and
+/// [`SimpleArcPeerManager`]. See their docs for more details.
+///
+/// This is not exported to bindings users as type aliases aren't supported in most languages.
+///
+/// [`SimpleArcChannelManager`]: crate::ln::channelmanager::SimpleArcChannelManager
+/// [`SimpleArcPeerManager`]: crate::ln::peer_handler::SimpleArcPeerManager
+#[cfg(not(c_bindings))]
+#[cfg(not(feature = "dnssec"))]
+pub type SimpleArcOnionMessenger<M, T, F, L> = OnionMessenger<
+ Arc<KeysManager>,
+ Arc<KeysManager>,
+ Arc<L>,
+ Arc<SimpleArcChannelManager<M, T, F, L>>,
+ Arc<DefaultMessageRouter<Arc<NetworkGraph<Arc<L>>>, Arc<L>, Arc<KeysManager>>>,
+ Arc<SimpleArcChannelManager<M, T, F, L>>,
+ Arc<SimpleArcChannelManager<M, T, F, L>>,
+ IgnoringMessageHandler,
+ IgnoringMessageHandler
+>;
+
+/// Useful for simplifying the parameters of [`SimpleRefChannelManager`] and
+/// [`SimpleRefPeerManager`]. See their docs for more details.
+///
+/// This is not exported to bindings users as type aliases aren't supported in most languages.
+///
+/// [`SimpleRefChannelManager`]: crate::ln::channelmanager::SimpleRefChannelManager
+/// [`SimpleRefPeerManager`]: crate::ln::peer_handler::SimpleRefPeerManager
+#[cfg(not(c_bindings))]
+#[cfg(feature = "dnssec")]
+pub type SimpleRefOnionMessenger<
+ 'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, M, T, F, L
+> = OnionMessenger<
+ &'a KeysManager,
+ &'a KeysManager,
+ &'b L,
+ &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
+ &'i DefaultMessageRouter<&'g NetworkGraph<&'b L>, &'b L, &'a KeysManager>,
+ &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
+ &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
+ &'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
IgnoringMessageHandler
>;
/// [`SimpleRefChannelManager`]: crate::ln::channelmanager::SimpleRefChannelManager
/// [`SimpleRefPeerManager`]: crate::ln::peer_handler::SimpleRefPeerManager
#[cfg(not(c_bindings))]
+#[cfg(not(feature = "dnssec"))]
pub type SimpleRefOnionMessenger<
'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, M, T, F, L
> = OnionMessenger<
&'i DefaultMessageRouter<&'g NetworkGraph<&'b L>, &'b L, &'a KeysManager>,
&'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
&'j SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, M, T, F, L>,
- IgnoringMessageHandler, // TODO: Swap for ChannelManager (when built with the "dnssec" feature)
+ IgnoringMessageHandler,
IgnoringMessageHandler
>;