/// Returns the [`EffectiveCapacity`] of the channel in the direction.
#[inline]
pub(super) fn effective_capacity(&self) -> EffectiveCapacity { self.inner.effective_capacity() }
-
- /// Returns the maximum HTLC amount allowed over the channel in the direction.
- #[inline]
- pub(super) fn htlc_maximum_msat(&self) -> u64 { self.inner.htlc_maximum_msat() }
}
impl<'a> fmt::Debug for DirectedChannelInfoWithUpdate<'a> {
&*self.channels
}
+ /// Returns information on a channel with the given id.
+ pub fn channel(&self, short_channel_id: u64) -> Option<&ChannelInfo> {
+ self.channels.get(&short_channel_id)
+ }
+
/// Returns all known nodes' public keys along with announced node info.
///
/// (C-not exported) because we have no mapping for `BTreeMap`s
&*self.nodes
}
+ /// Returns information on a node with the given id.
+ pub fn node(&self, node_id: &NodeId) -> Option<&NodeInfo> {
+ self.nodes.get(node_id)
+ }
+
/// Get network addresses by node id.
/// Returns None if the requested node is completely unknown,
/// or if node announcement for the node was never received.