mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge #9026: Fix handling of invalid compact blocks
d4833ffBump the protocol version to distinguish new banning behavior. (Suhas Daftuar)88c3549Fix compact block handling to not ban if block is invalid (Suhas Daftuar)c93beac[qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
This commit is contained in:
commit
dc6b9406bd
9 changed files with 81 additions and 21 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue