aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-05-15 17:07:11 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2015-06-17 15:37:50 -0400
commitae6f957a628efeeae47b8a2deee595c2ac5e7640 (patch)
treec7525feb8f3fb57ea6fee6fed7e5028368d31b4d
parent0da6ae2dc312ad180dd5118a41810d2ee95f01d4 (diff)
downloadbitcoin-ae6f957a628efeeae47b8a2deee595c2ac5e7640.tar.xz
Enable block relay when pruning
-rw-r--r--src/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 49bcce5ce2..0791e3ed00 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2281,9 +2281,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
int nBlockEstimate = 0;
if (fCheckpointsEnabled)
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints());
- // Don't relay blocks if pruning -- could cause a peer to try to download, resulting
- // in a stalled download if the block file is pruned before the request.
- if (nLocalServices & NODE_NETWORK) {
+ {
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes)
if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))