feat(net): get external IPv4 from libp2p#5407
feat(net): get external IPv4 from libp2p#5407317787106 merged 18 commits intotronprotocol:developfrom
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.
Please don't add non-relevant tests.
There was a problem hiding this comment.
test coverage will get smaller if don't add non-relevant tests.
There was a problem hiding this comment.
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.
I'd suggest just deleting the useless code.
| 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.
"46.168.1.1": What kind of node is this IP?
There was a problem hiding this comment.
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.
Then it is recommended to get the variables from the Constant.TEST_CONF
There was a problem hiding this comment.
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