Mercurial > hg > bitcoin
changeset 3609:2efc7e0a7ad7 draft
Merge pull request #1834 from jgarzik/kickblocks
P2P: Do not request blocks from peers with fewer blocks than us
author | Jeff Garzik <jgarzik@exmulti.com> |
---|---|
date | Mon, 08 Oct 2012 15:15:58 -0700 (2012-10-08) |
parents | 1a9fe03c4f6b (current diff) 0e314f4024c0 (diff) |
children | eb2790dc6d37 |
files | src/main.cpp |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.cpp +++ b/src/main.cpp @@ -2513,6 +2513,7 @@ // 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))