From ec4c6a17e82a6726d95075b43ebd2525c50b37cd Mon Sep 17 00:00:00 2001 From: glowang Date: Mon, 8 Jun 2020 22:04:07 -0700 Subject: scripted-diff: replace MAX_BLOCKS_ONLY_CONNECTIONS with MAX_BLOCK_RELAY_ONLY_CONNECTIONS -BEGIN VERIFY SCRIPT- sed -i 's/\/MAX_BLOCK_RELAY_ONLY_CONNECTIONS/g' src/init.cpp sed -i 's/\/MAX_BLOCK_RELAY_ONLY_CONNECTIONS/g' src/net.h -END VERIFY SCRIPT- --- src/init.cpp | 2 +- src/net.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 37e6251295..6b4d560192 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1889,7 +1889,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node) 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 = MAX_FEELER_CONNECTIONS; connOptions.nBestHeight = chain_active_height; diff --git a/src/net.h b/src/net.h index 517445e8f4..9c1f16ba60 100644 --- a/src/net.h +++ b/src/net.h @@ -61,7 +61,7 @@ static const int MAX_OUTBOUND_FULL_RELAY_CONNECTIONS = 8; /** Maximum number of addnode outgoing nodes */ static const int MAX_ADDNODE_CONNECTIONS = 8; /** 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 */ -- cgit v1.2.3