The right way to set bitcoind‘s default connection rely

0
91


The place is the supply code about this default connection rely?

static const int MAX_OUTBOUND_FULL_RELAY_CONNECTIONS = 8;
/** Most variety of addnode outgoing nodes */
static const int MAX_ADDNODE_CONNECTIONS = 8;
/** Most variety of block-relay-only outgoing connections */
static const int MAX_BLOCK_RELAY_ONLY_CONNECTIONS = 2;
/** The utmost variety of peer connections to take care of. */
static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;

https://github.com/bitcoin/bitcoin/blob/grasp/src/internet.h#L66
https://github.com/bitcoin/bitcoin/blob/grasp/src/internet.h#L76

There is usually a most of 16 outgoing full relay connections, together with 8 automated and eight handbook.
Moreover, there are two block relay connections.
Due to this fact, a node that begins up for the primary time has 10 by default after a short time.

Can i take advantage of some command to set this quantity when beginning bitcoind?

You need to use -maxconnections for sustaining at most N connections to friends nevertheless this contains outbound and inbound. It’s 125 by default.

Some modifications to the supply code shall be required if you wish to make outbound connections rely configurable: Improve most variety of outgoing connections for full node


You can even enhance connection rely by incoming connections. This doc contains directions and settings to setup node and pay attention for incoming connections utilizing i2p: https://github.com/bitcoin/bitcoin/blob/grasp/doc/i2p.md

LEAVE A REPLY

Please enter your comment!
Please enter your name here