File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1649,13 +1649,23 @@ impl ReadOnlyNetworkGraph<'_> {
1649
1649
& * self . channels
1650
1650
}
1651
1651
1652
+ /// Returns information on a channel with the given id.
1653
+ pub fn channel ( & self , short_channel_id : u64 ) -> Option < & ChannelInfo > {
1654
+ self . channels . get ( & short_channel_id)
1655
+ }
1656
+
1652
1657
/// Returns all known nodes' public keys along with announced node info.
1653
1658
///
1654
1659
/// (C-not exported) because we have no mapping for `BTreeMap`s
1655
1660
pub fn nodes ( & self ) -> & BTreeMap < NodeId , NodeInfo > {
1656
1661
& * self . nodes
1657
1662
}
1658
1663
1664
+ /// Returns information on a node with the given id.
1665
+ pub fn node ( & self , node_id : & NodeId ) -> Option < & NodeInfo > {
1666
+ self . nodes . get ( node_id)
1667
+ }
1668
+
1659
1669
/// Get network addresses by node id.
1660
1670
/// Returns None if the requested node is completely unknown,
1661
1671
/// or if node announcement for the node was never received.
You can’t perform that action at this time.
0 commit comments