Remove pfrom parameter from ProcessNewBlock

This further decouples ProcessNewBlock from networking/peer logic.
This commit is contained in:
Matt Corallo
2016-10-02 11:04:49 -04:00
parent e2e069dabc
commit 7c98ce584e
5 changed files with 29 additions and 18 deletions

View File

@@ -132,7 +132,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
continue;
}
CValidationState state;
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false))
if (!ProcessNewBlock(state, Params(), pblock, true, NULL, NULL))
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, false);
bool fAccepted = ProcessNewBlock(state, Params(), &block, true, NULL, NULL);
UnregisterValidationInterface(&sc);
if (fBlockPresent)
{