Move ChannelManager::monitor_updated to a MonitorEvent
[rust-lightning] / lightning / src / routing / network_graph.rs
index 961939cb7e6dedd4126c8a9daf7e4d839135bc6e..f65b8fa657a5fc2e77da24a33578ecf51089e8c4 100644 (file)
@@ -1213,12 +1213,10 @@ impl ReadOnlyNetworkGraph<'_> {
        /// 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.
-       ///
-       /// (C-not exported) as there is no practical way to track lifetimes of returned values.
-       pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<&Vec<NetAddress>> {
+       pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<Vec<NetAddress>> {
                if let Some(node) = self.nodes.get(&NodeId::from_pubkey(&pubkey)) {
                        if let Some(node_info) = node.announcement_info.as_ref() {
-                               return Some(&node_info.addresses)
+                               return Some(node_info.addresses.clone())
                        }
                }
                None