aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 46ab8dad33..7d2e0e77ee 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1088,6 +1088,7 @@ public:
m_max_outbound_full_relay = std::min(MAX_OUTBOUND_FULL_RELAY_CONNECTIONS, nMaxConnections);
m_max_outbound_block_relay = std::min(MAX_BLOCK_RELAY_ONLY_CONNECTIONS, nMaxConnections - m_max_outbound_full_relay);
m_max_outbound = m_max_outbound_full_relay + m_max_outbound_block_relay + nMaxFeeler;
+ m_max_inbound = std::max(0, nMaxConnections - m_max_outbound);
m_use_addrman_outgoing = connOptions.m_use_addrman_outgoing;
m_client_interface = connOptions.uiInterface;
m_banman = connOptions.m_banman;
@@ -1485,6 +1486,7 @@ private:
int nMaxAddnode{MAX_ADDNODE_CONNECTIONS};
int nMaxFeeler{MAX_FEELER_CONNECTIONS};
int m_max_outbound;
+ int m_max_inbound;
bool m_use_addrman_outgoing;
CClientUIInterface* m_client_interface;
NetEventsInterface* m_msgproc;