Merge #8865: Decouple peer-processing-logic from block-connection-logic
a9aec5cUse BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo)7565e03Remove SyncWithWallets wrapper function (Matt Corallo)12ee1feAlways call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo)f5efa28Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo)fef1010Use CValidationInterface from chain logic to notify peer logic (Matt Corallo)aefcb7bMove net-processing logic definitions together in main.h (Matt Corallo)0278fb5Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo)87e7d72Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
This commit is contained in:
+2
-2
@@ -132,7 +132,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
|
||||
continue;
|
||||
}
|
||||
CValidationState state;
|
||||
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, g_connman.get()))
|
||||
if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
|
||||
++nHeight;
|
||||
blockHashes.push_back(pblock->GetHash().GetHex());
|
||||
@@ -751,7 +751,7 @@ UniValue submitblock(const UniValue& params, bool fHelp)
|
||||
CValidationState state;
|
||||
submitblock_StateCatcher sc(block.GetHash());
|
||||
RegisterValidationInterface(&sc);
|
||||
bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL, g_connman.get());
|
||||
bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL);
|
||||
UnregisterValidationInterface(&sc);
|
||||
if (fBlockPresent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user