-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(net): get external IPv4 from libp2p #5407
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
feat(net): get external IPv4 from libp2p #5407
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5407 +/- ##
=============================================
+ Coverage 61.22% 61.25% +0.03%
- Complexity 9319 9326 +7
=============================================
Files 842 842
Lines 50161 50147 -14
Branches 5581 5580 -1
=============================================
+ Hits 30711 30720 +9
+ Misses 17040 17021 -19
+ Partials 2410 2406 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
framework/src/test/java/org/tron/common/config/args/ArgsTest.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/tron/common/parameter/CommonParameter.java
Outdated
Show resolved
Hide resolved
|
|
||
| private void buildAssetIssue() { | ||
| AssetIssueContract.Builder builder = AssetIssueContract.newBuilder(); | ||
| builder.setOwnerAddress(ByteString.copyFromUtf8("Address1")); |
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.
Please don't add non-relevant tests.
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.
test coverage will get smaller if don't add non-relevant tests.
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.
Please follow the PR submission guidelines.
|
|
||
| public static final String NODE_DISCOVERY_EXTERNAL_IP = "node.discovery.external.ip"; | ||
| public static final String AMAZONAWS_URL = "http://checkip.amazonaws.com"; | ||
| //public static final String AMAZONAWS_URL = "http://checkip.amazonaws.com"; |
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.
I'd suggest just deleting the useless code.
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.
I will delete it
| method2.invoke(Args.class, config3); | ||
|
|
||
| Assert.assertNotEquals("127.0.0.1", CommonParameter.getInstance().getNodeDiscoveryBindIp()); | ||
| Assert.assertNotEquals("46.168.1.1", CommonParameter.getInstance().getNodeExternalIp()); |
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.
"46.168.1.1": What kind of node is this IP?
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.
46.168.1.1 is the configed node.discovery.external.ip in Constant.TEST_CONF.
127.0.0.1 s the configed node.discovery.bind.ip in Constant.TEST_CONF.
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.
Then it is recommended to get the variables from the Constant.TEST_CONF
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.
I have updated this testcase.
What does this PR do?
Why are these changes required?
This PR has been tested by:
Follow up
Extra details