diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-10-08 15:15:58 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2012-10-08 15:15:58 -0700 |
commit | de2b9459bd138e2ca8431dbcc43ff1758590132e (patch) | |
tree | 7293b5fd59fd79368b7af92fb3b2a53c4b9e3c5d /src | |
parent | b855abb8db3bd980312274d7b5276c9efba6a5c1 (diff) | |
parent | 93dd68e924c7cf24b75bfb5b83b1be1cdc27dbdc (diff) | |
download | bitcoin-de2b9459bd138e2ca8431dbcc43ff1758590132e.tar.xz |
Merge pull request #1834 from jgarzik/kickblocks
P2P: Do not request blocks from peers with fewer blocks than us
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 1 |
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)) |