This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-2560] Consolidate p2p node info methods #1288
Merged
mbaxter
merged 14 commits into
PegaSysEng:master
from
mbaxter:PAN-2560/consolidate-p2p-node-info-methods
Apr 16, 2019
Merged
[PAN-2560] Consolidate p2p node info methods #1288
mbaxter
merged 14 commits into
PegaSysEng:master
from
mbaxter:PAN-2560/consolidate-p2p-node-info-methods
Apr 16, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clean up some exception handling in json-rpc methods. Log json-rpc internal server errors.
ajsutton
approved these changes
Apr 16, 2019
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.
LGTM. Couple of little nits that would make it even better. :)
ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcHttpService.java
Outdated
Show resolved
Hide resolved
...rpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/internal/methods/AdminNodeInfo.java
Outdated
Show resolved
Hide resolved
…jsonrpc/JsonRpcHttpService.java Co-Authored-By: mbaxter <mbaxter@users.noreply.github.com>
…jsonrpc/internal/methods/AdminNodeInfo.java Co-Authored-By: mbaxter <mbaxter@users.noreply.github.com>
notlesh
pushed a commit
to notlesh/pantheon
that referenced
this pull request
Apr 24, 2019
notlesh
pushed a commit
to notlesh/pantheon
that referenced
this pull request
May 4, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
We currently have 3 different methods on
P2PNetwork
for retrieving local node information:getSelfEnodeUrl
,getAdvertisedPeer
, andgetLocalPeerInfo
. This PR consolidates the three methods down to 1:getLocalEnode()
. And adds a more explicit method for checking on the status of the discovery service:isDiscoveryEnabled()
.Other incidental changes include:
EnodeURL.getEffectiveDiscoveryPort()
returning anint
indicating the port where discovery should be listening if it is enabled