aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-10-08 15:15:58 -0700
committerJeff Garzik <jgarzik@exmulti.com>2012-10-08 15:15:58 -0700
commitde2b9459bd138e2ca8431dbcc43ff1758590132e (patch)
tree7293b5fd59fd79368b7af92fb3b2a53c4b9e3c5d /src/main.cpp
parentb855abb8db3bd980312274d7b5276c9efba6a5c1 (diff)
parent93dd68e924c7cf24b75bfb5b83b1be1cdc27dbdc (diff)
Merge pull request #1834 from jgarzik/kickblocks
P2P: Do not request blocks from peers with fewer blocks than us
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index da1072970c..28bf01a8cb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2513,6 +2513,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
// Ask the first connected node for block updates
static int nAskedForBlocks = 0;
if (!pfrom->fClient && !pfrom->fOneShot &&
+ (pfrom->nStartingHeight > (nBestHeight - 144)) &&
(pfrom->nVersion < NOBLKS_VERSION_START ||
pfrom->nVersion >= NOBLKS_VERSION_END) &&
(nAskedForBlocks < 1 || vNodes.size() <= 1))