aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2018-02-11 21:00:50 +0000
committerRoss Nicoll <[email protected]>2018-09-19 22:11:47 +0100
commit9c3a11b2488f3e01e6763bc1217598a4d1c69bde (patch)
treeed6b54c5b71a4543a32968dc5b1d391bfe59dfed /src/net_processing.cpp
parentInsert Dogecoin testnet merkle tree root value (#1469) (diff)
downloaddiscoin-9c3a11b2488f3e01e6763bc1217598a4d1c69bde.tar.xz
discoin-9c3a11b2488f3e01e6763bc1217598a4d1c69bde.zip
Clean up RPC tests (#1465)
* Enable full block tests * Fix invalidblocktest * Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later. * Fix `fundrawtransaction` tests and sanitize fee calculation at the same time * Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions * Set block versions on full block tests so that the generated blocks are AuxPoW compatible
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 856072f32..706b4c68f 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1644,7 +1644,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
// If pruning, don't inv blocks unless we have on disk and are likely to still have
// for some reasonable time window (1 hour) that block relay might require.
const int nPrunedBlocksLikelyToHave = MIN_BLOCKS_TO_KEEP - 3600 / chainparams.GetConsensus(pindex->nHeight).nPowTargetSpacing;
- if (fPruneMode && (!(pindex->nStatus & BLOCK_HAVE_DATA) || pindex->nHeight <= chainActive.Tip()->nHeight - nPrunedBlocksLikelyToHave))
+ if (fPruneMode && (!(pindex->nStatus & BLOCK_HAVE_DATA) || pindex->nHeight <= chainActive.Height() - nPrunedBlocksLikelyToHave))
{
LogPrint("net", " getblocks stopping, pruned or too old block at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
break;