mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge pull request #4894 from PastaPastaPasta/develop-trivial-2022-06-22
backport: trivial backports
This commit is contained in:
commit
46c887d394
@ -2488,9 +2488,9 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA
|
||||
connOptions.nLocalServices = nLocalServices;
|
||||
connOptions.nMaxConnections = nMaxConnections;
|
||||
connOptions.m_max_outbound_full_relay = std::min(MAX_OUTBOUND_FULL_RELAY_CONNECTIONS, connOptions.nMaxConnections);
|
||||
connOptions.m_max_outbound_block_relay = std::min(MAX_BLOCKS_ONLY_CONNECTIONS, connOptions.nMaxConnections-connOptions.m_max_outbound_full_relay);
|
||||
connOptions.m_max_outbound_block_relay = std::min(MAX_BLOCK_RELAY_ONLY_CONNECTIONS, connOptions.nMaxConnections-connOptions.m_max_outbound_full_relay);
|
||||
connOptions.nMaxAddnode = MAX_ADDNODE_CONNECTIONS;
|
||||
connOptions.nMaxFeeler = 1;
|
||||
connOptions.nMaxFeeler = MAX_FEELER_CONNECTIONS;
|
||||
connOptions.nBestHeight = chain_active_height;
|
||||
connOptions.uiInterface = &uiInterface;
|
||||
connOptions.m_banman = node.banman.get();
|
||||
|
@ -76,7 +76,9 @@ static const int MAX_ADDNODE_CONNECTIONS = 8;
|
||||
/** Eviction protection time for incoming connections */
|
||||
static const int INBOUND_EVICTION_PROTECTION_TIME = 1;
|
||||
/** Maximum number of block-relay-only outgoing connections */
|
||||
static const int MAX_BLOCKS_ONLY_CONNECTIONS = 2;
|
||||
static const int MAX_BLOCK_RELAY_ONLY_CONNECTIONS = 2;
|
||||
/** Maximum number of feeler connections */
|
||||
static const int MAX_FEELER_CONNECTIONS = 1;
|
||||
/** -listen default */
|
||||
static const bool DEFAULT_LISTEN = true;
|
||||
/** The maximum number of peer connections to maintain.
|
||||
|
@ -151,11 +151,11 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
|
||||
auto peerLogic = MakeUnique<PeerLogicValidation>(connman.get(), nullptr, *m_node.scheduler, *m_node.chainman, *m_node.mempool, false);
|
||||
|
||||
const Consensus::Params& consensusParams = Params().GetConsensus();
|
||||
constexpr int max_outbound_full_relay = 8;
|
||||
constexpr int max_outbound_full_relay = MAX_OUTBOUND_FULL_RELAY_CONNECTIONS;
|
||||
CConnman::Options options;
|
||||
options.nMaxConnections = 125;
|
||||
options.nMaxConnections = DEFAULT_MAX_PEER_CONNECTIONS;
|
||||
options.m_max_outbound_full_relay = max_outbound_full_relay;
|
||||
options.nMaxFeeler = 1;
|
||||
options.nMaxFeeler = MAX_FEELER_CONNECTIONS;
|
||||
|
||||
connman->Init(options);
|
||||
std::vector<CNode *> vNodes;
|
||||
|
Loading…
Reference in New Issue
Block a user