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
i2p: log connection was refused due to arbitrary port #29393
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Concept ACK 950f360. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cr utACK 950f360
Tested ACK 950f360. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach ACK
950f360
to
5b358cd
Compare
Force-pushed addressing #29393 (comment) |
ACK 5b358cd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK 5b358cd
re-ACK 5b358cd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 5b358cd
How did you come to this? Did you encounter some !=0 I2P ports in the wild? I don't have any in my addrman:
$ bitcoin-cli getnodeaddresses 0 |jq 'map(select(.address |test("\\.i2p$"; "i"))) |map(select(.port != 0)) |length'
0
$ bitcoin-cli getnodeaddresses 0 |jq 'map(select(.address |test("\\.i2p$"; "i"))) |map(select(.port == 0)) |length'
1605
I didn't encounter in practice, in fact, I was testing some nuances of i2p and tried to add it using |
ACK 5b358cd |
For I2P, we do not try to connect if port is != 0. However, we do not have anything that indicates it or any error when trying to connect with port != 0. This PR adds a log for it. Also, it improves the functional test. With this log we can ensure the reason we won't connect is the port, in the current test, we cannot ensure it.