File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1649,13 +1649,23 @@ impl ReadOnlyNetworkGraph<'_> {
16491649 & * self . channels
16501650 }
16511651
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+
16521657 /// Returns all known nodes' public keys along with announced node info.
16531658 ///
16541659 /// (C-not exported) because we have no mapping for `BTreeMap`s
16551660 pub fn nodes ( & self ) -> & BTreeMap < NodeId , NodeInfo > {
16561661 & * self . nodes
16571662 }
16581663
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+
16591669 /// Get network addresses by node id.
16601670 /// Returns None if the requested node is completely unknown,
16611671 /// or if node announcement for the node was never received.
You can’t perform that action at this time.
0 commit comments