PEER_PRIVATE suppresses outbound connections to unconfigured peers.

This commit is contained in:
David Schwartz
2013-09-24 15:40:24 -07:00
parent 8b0df758f3
commit 2f77ca416a
3 changed files with 12 additions and 10 deletions

View File

@@ -120,8 +120,8 @@
#
# 0 or 1.
#
# 0: request peers to broadcast your address. [default]
# 1: request peers not broadcast your address.
# 0: Request peers to broadcast your address. Normal outbound peer connections [default]
# 1: Request peers not broadcast your address. Only connect to configured peers.
#
#
#

View File

@@ -614,20 +614,21 @@ public:
// Begin connecting to network.
//
if (!getConfig ().RUN_STANDALONE)
{
m_peers->start ();
if (getConfig ().PEER_PRIVATE && getConfig ().IPS.empty ())
m_journal.warning << "No outbound peer connections will be made";
if (getConfig ().RUN_STANDALONE)
// VFALCO NOTE the state timer resets the deadlock detector.
//
m_networkOPs->setStateTimer ();
}
else
{
m_journal.warning << "Running in standalone mode";
m_networkOPs->setStandAlone ();
}
else
{
// VFALCO NOTE the state timer resets the deadlock detector.
//
m_networkOPs->setStateTimer ();
}
}
//--------------------------------------------------------------------------

View File

@@ -352,6 +352,7 @@ void PeersImp::policyEnforce ()
(void) mPolicyTimer.cancel ();
// Enforce policies.
if (!getConfig ().PEER_PRIVATE)
policyLowWater ();
if (((++mPhase) % 12) == 0)