We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe8c10d + d2b7f6c commit 2144166Copy full SHA for 2144166
lightning/src/routing/network_graph.rs
@@ -1213,12 +1213,10 @@ impl ReadOnlyNetworkGraph<'_> {
1213
/// Get network addresses by node id.
1214
/// Returns None if the requested node is completely unknown,
1215
/// or if node announcement for the node was never received.
1216
- ///
1217
- /// (C-not exported) as there is no practical way to track lifetimes of returned values.
1218
- pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<&Vec<NetAddress>> {
+ pub fn get_addresses(&self, pubkey: &PublicKey) -> Option<Vec<NetAddress>> {
1219
if let Some(node) = self.nodes.get(&NodeId::from_pubkey(&pubkey)) {
1220
if let Some(node_info) = node.announcement_info.as_ref() {
1221
- return Some(&node_info.addresses)
+ return Some(node_info.addresses.clone())
1222
}
1223
1224
None
0 commit comments