Upgrading from 0.50.0 to 0.52.3
              
              #4674
            
            
          Replies: 2 comments 8 replies
-
        
 All good! This is what discussions are for :) 
 Correct. All APIs on  There is an open issue and ongoing effort about sharing peer addresses across  For the moment, it is unfortunately only possible to be notified about the addresses you get connected to. What function does your   | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         Closing here. Seems resolved. Please let us know if you have more questions.  | 
  
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are currently upgrading our
libp2pversion and I thought I would start a discussion here for any ongoing questions we have in the process. LMK if there would be a better way of organizing our questions.It is possible that our architecture is also out of date/wrong. Hopefully this will also be an opportunity to update the architecture as well.
I'm not sure of all the issues we are going to have; we have already successfully converted a lot of the code. But I'll start with the current problem:
Background
We have a custom network behavior
PeerReportBehaviorwhichon_swarm_event, will take thepeer_idfrom aFromSwarm::ConnectionEstablishedand lookup the addresses of thatpeer_idusingaddresses_of_peerwhich under the hood is:Obviously,
addresses_of_peeris no longer available fromPeerReportBehaviororidentify::Behavior, so I thought maybeidentify::Behaviormight expose a getter fordiscovered_peerswhich is what the oldaddresses_of_peerused to do here. It doesn't.Question
What is the correct way of getting those peer addresses?
I could just hit
handle_pending_outbound_connectionswhich will return the desired addresses as seen here. It just has a bunch of additional (albeit unused in this case) parameters, which makes me feel like this isn't the intended use.I would appreciate your perspective and guidance avoiding any pitfalls here :)
Beta Was this translation helpful? Give feedback.
All reactions