X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Fnetwork_graph.rs;h=f65b8fa657a5fc2e77da24a33578ecf51089e8c4;hb=3016ed2d9146bfff116f035404b333ba950a1195;hp=961939cb7e6dedd4126c8a9daf7e4d839135bc6e;hpb=fe8c10db95124e3238b7469bdabb00afc7c5bdd6;p=rust-lightning diff --git a/lightning/src/routing/network_graph.rs b/lightning/src/routing/network_graph.rs index 961939cb..f65b8fa6 100644 --- a/lightning/src/routing/network_graph.rs +++ b/lightning/src/routing/network_graph.rs @@ -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> { + pub fn get_addresses(&self, pubkey: &PublicKey) -> Option> { 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