Skip to content

Commit

Permalink
Merge pull request #1834 from jgarzik/kickblocks
Browse files Browse the repository at this point in the history
P2P: Do not request blocks from peers with fewer blocks than us
  • Loading branch information
Jeff Garzik committed Oct 8, 2012
2 parents b855abb + 93dd68e commit de2b945
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit de2b945

Please sign in to comment.