Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2560] Consolidate p2p node info methods #1288

Merged

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Apr 16, 2019

PR description

We currently have 3 different methods on P2PNetwork for retrieving local node information: getSelfEnodeUrl, getAdvertisedPeer, and getLocalPeerInfo. 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:

  • Adding EnodeURL.getEffectiveDiscoveryPort() returning an int indicating the port where discovery should be listening if it is enabled
  • A bit of cleanup for some JSON-RPC methods that were catching and logging errors: updated server logic so that unexpected errors are always logged.

Copy link
Contributor

@ajsutton ajsutton left a 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. :)

mbaxter and others added 5 commits April 15, 2019 23:32
…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>
@mbaxter mbaxter merged commit 15173ef into PegaSysEng:master Apr 16, 2019
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants