diff options
| author | Suhas Daftuar <[email protected]> | 2016-10-31 10:03:49 -0400 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2016-11-03 13:07:12 -0400 |
| commit | 88c35491ab19f9afdf9b3fa9356a072f70ef2f55 (patch) | |
| tree | 979296a970eea7001a5133bb792bda690bcb428c /src/rpc/mining.cpp | |
| parent | [qa] Test that invalid compactblocks don't result in ban (diff) | |
| download | discoin-88c35491ab19f9afdf9b3fa9356a072f70ef2f55.tar.xz discoin-88c35491ab19f9afdf9b3fa9356a072f70ef2f55.zip | |
Fix compact block handling to not ban if block is invalid
Diffstat (limited to 'src/rpc/mining.cpp')
| -rw-r--r-- | src/rpc/mining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index be0776ea2..564102ff9 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) { |