diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index ad0c88f82..ade5b0d97 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -187,7 +187,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) { std::vector vchMasterNodeSignature; int64_t masterNodeSignatureTime = GetAdjustedTime(); - std::string strMessage = service.ToString() + boost::lexical_cast(masterNodeSignatureTime) + boost::lexical_cast(0); + std::string strMessage = service.ToString() + boost::lexical_cast(masterNodeSignatureTime) + boost::lexical_cast(false); if(!darkSendSigner.SignMessage(strMessage, retErrorMessage, vchMasterNodeSignature, keyMasternode)) { errorMessage = "dseep sign message failed: " + retErrorMessage; @@ -201,7 +201,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) - pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, 0); + pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, false); /* * END OF "REMOVE" diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index 7f6b224f6..9d137b50d 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -901,7 +901,15 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey); tx.vin.push_back(vin); tx.vout.push_back(vout); - if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){ + + bool fAcceptable = false; + { + TRY_LOCK(cs_main, lockMain); + if(!lockMain) return; + fAcceptable = AcceptableInputs(mempool, state, CTransaction(tx), false, NULL); + } + + if(fAcceptable){ if(fDebug) LogPrintf("dsee - Accepted OLD Masternode entry %i %i\n", count, current); if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){ @@ -1006,7 +1014,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData } // fake ping - pmn->lastPing = CMasternodePing(); + pmn->lastPing = CMasternodePing(vin); pmn->Check(); if(pmn->IsEnabled()) { TRY_LOCK(cs_vNodes, lockNodes);