Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #659
This PR adds startup options (available via both command line and the
config.iniconfiguration file) towitness_node:p2p-accept-incoming-connectionswill allow peers to request a connection to your node (default istrue). Set tofalse, your node will not listen for incoming connections. The "accept-incoming-connections" is an existing field in the node configuration file (p2p/node_config.json), now accessible from the command line and theconfig.iniconfiguration file.p2p-inbound-endpoint, used to specify the node's "external" IP address and listening port when it is behind DNAT or a reverse proxy.p2p-connect-to-new-peerswill allow the node to connect to new peers advertised by other peers (default istrue). Set tofalse, the node will ignore all peer advertisements.p2p-advertise-peer-algorithmdetermines how peers are selected to be advertised.p2p-advertise-peer-endpointandp2p-exclude-peer-endpointwork in conjunction with some of the peer algorithms.The peer algorithms that can be used are:
nothingwhich will respond to the requesting peer with an empty listlistwhich will respond with a list of connected peers which are also in the list provided byp2p-advertise-peer-endpointexclude_listwhich will respond with a list of connected peers which are not in the list provided byp2p-exclude-peer-endpointall, or any other value, or if no peer algorithm is provided, all connected peers are advertised as they were before this enhancement.Other changes and improvements:
1776) by default, rather than a random port. Ifp2p-endpointoption is not specified, when the default port is unavailable, the node will listen on a random port.address_messageif it has just requested one200addresses for eachaddress_messagenumber_of_failed_connection_attemptswill be halved on successful outbound connectionnetwork_mapperprogramfc::ip::address::is_loopback_address()(127.*.*.*), fixedis_public_address()to detect loopback addresses