mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
draft
This commit is contained in:
parent
171c0b145a
commit
64aad03485
@ -4881,12 +4881,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
|
||||
else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
|
||||
{
|
||||
TRY_LOCK(cs_main, lockMainBlock);
|
||||
if(!lockMainBlock) return;
|
||||
|
||||
CBlock block;
|
||||
vRecv >> block;
|
||||
|
||||
TRY_LOCK(cs_main, lockMainBlock);
|
||||
if(!lockMainBlock) {
|
||||
LogPrintf("block -- failed to lock cs_main - %s\n", block.GetHash().ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
CInv inv(MSG_BLOCK, block.GetHash());
|
||||
LogPrint("net", "received block %s peer=%d\n", inv.hash.ToString(), pfrom->id);
|
||||
|
||||
|
@ -185,6 +185,7 @@ Value spork(const Array& params, bool fHelp)
|
||||
|
||||
//broadcast new spork
|
||||
if(sporkManager.UpdateSpork(nSporkID, nValue)){
|
||||
ExecuteSpork(nSporkID, nValue);
|
||||
return "success";
|
||||
} else {
|
||||
return "failure";
|
||||
|
Loading…
Reference in New Issue
Block a user