File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1213,12 +1213,10 @@ impl ReadOnlyNetworkGraph<'_> {
1213
1213
/// Get network addresses by node id.
1214
1214
/// Returns None if the requested node is completely unknown,
1215
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 > > {
1216
+ pub fn get_addresses ( & self , pubkey : & PublicKey ) -> Option < Vec < NetAddress > > {
1219
1217
if let Some ( node) = self . nodes . get ( & NodeId :: from_pubkey ( & pubkey) ) {
1220
1218
if let Some ( node_info) = node. announcement_info . as_ref ( ) {
1221
- return Some ( & node_info. addresses )
1219
+ return Some ( node_info. addresses . clone ( ) )
1222
1220
}
1223
1221
}
1224
1222
None
You can’t perform that action at this time.
0 commit comments