aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2016-10-31 10:03:49 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2016-11-03 13:07:12 -0400
commit88c35491ab19f9afdf9b3fa9356a072f70ef2f55 (patch)
tree979296a970eea7001a5133bb792bda690bcb428c /src/rpc
parentc93beac43fa66c8431e3952283edb5be8c65606c (diff)
downloadbitcoin-88c35491ab19f9afdf9b3fa9356a072f70ef2f55.tar.xz
Fix compact block handling to not ban if block is invalid
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/mining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index be0776ea22..564102ff95 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -132,7 +132,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
continue;
}
CValidationState state;
- if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL))
+ if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false))
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
++nHeight;
blockHashes.push_back(pblock->GetHash().GetHex());
@@ -757,7 +757,7 @@ UniValue submitblock(const JSONRPCRequest& request)
CValidationState state;
submitblock_StateCatcher sc(block.GetHash());
RegisterValidationInterface(&sc);
- bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL);
+ bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL, false);
UnregisterValidationInterface(&sc);
if (fBlockPresent)
{