-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(net): get external IPv4 from libp2p #5407
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #5407 +/- ##
=============================================
+ Coverage 60.89% 61.23% +0.33%
- Complexity 9231 9254 +23
=============================================
Files 839 839
Lines 50029 49994 -35
Branches 5574 5569 -5
=============================================
+ Hits 30467 30613 +146
+ Misses 17176 16981 -195
- Partials 2386 2400 +14
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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
@@ -296,9 +297,17 @@ private static Block getBuildBlock(long timestamp, long num, long witnessId, | |||
|
|||
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.
@@ -284,7 +284,7 @@ public class Constant { | |||
public static final String NODE_DISCOVERY_BIND_IP = "node.discovery.bind.ip"; | |||
|
|||
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