Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send peers the remote IP we see on the connection #1244

Closed
TheBlueMatt opened this issue Jan 17, 2022 · 5 comments · Fixed by #1326
Closed

Send peers the remote IP we see on the connection #1244

TheBlueMatt opened this issue Jan 17, 2022 · 5 comments · Fixed by #1326
Labels
good first issue Good for newcomers

Comments

@TheBlueMatt
Copy link
Collaborator

We should implement the BOLT spec change from lightning/bolts#917. Its a bit tricky with our architecture since we don't manage the TCP sockets ourselves, but we can just have the user provide the address in the connection-accepted/connection-made calls into PeerHandler and go from there.

@TheBlueMatt TheBlueMatt added the good first issue Good for newcomers label Jan 17, 2022
@Psycho-Pirate
Copy link
Contributor

I would like to work on this. Please tell me where should I start?

@TheBlueMatt
Copy link
Collaborator Author

We'll want the outbound connection opening function in PeerHandler to take a new argument in the form of a NetworkAddress, and then we'll want to store it (maybe Option-aly) in the Peer struct, copying it into the Init message when we send that.

@Psycho-Pirate
Copy link
Contributor

Thanks! I will look into this!

@Psycho-Pirate
Copy link
Contributor

Psycho-Pirate commented Feb 19, 2022

We'll want the outbound connection opening function in PeerHandler to take a new argument in the form of a NetworkAddress, and then we'll want to store it (maybe Option-aly) in the Peer struct, copying it into the Init message when we send that.

What will be the data type of NetworkAddress? Also do you want me to name the variable as NetworkAddress or something like their_Network_Address inside the Peer struct.

@TheBlueMatt
Copy link
Collaborator Author

Sorry, I meant NetAddress (which is already a thing), not NetworkAddress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants