changed some locks
This commit is contained in:
parent
e4b6f85e69
commit
c5da226a09
@ -102,7 +102,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
|
||||
}
|
||||
|
||||
} else if (strCommand == "dsq") { //Darksend Queue
|
||||
LOCK(cs_darksend);
|
||||
TRY_LOCK(cs_darksend);
|
||||
|
||||
if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
|
||||
return;
|
||||
@ -2508,7 +2508,6 @@ void CDarksendPool::RelayInAnon(std::vector<CTxIn>& vin, std::vector<CTxOut>& vo
|
||||
|
||||
void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxDSOut>& vout)
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
|
||||
std::vector<CTxIn> vin2;
|
||||
std::vector<CTxOut> vout2;
|
||||
@ -2519,6 +2518,7 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
|
||||
BOOST_FOREACH(CTxDSOut out, vout)
|
||||
vout2.push_back(out);
|
||||
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
{
|
||||
if(!pSubmittedToMasternode) return;
|
||||
|
@ -222,9 +222,9 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
|
||||
|
||||
void CMasternode::Check()
|
||||
{
|
||||
LOCK(cs_main);
|
||||
TRY_LOCK(cs_main);
|
||||
|
||||
if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD)
|
||||
if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD)
|
||||
{
|
||||
activeState = MASTERNODE_POS_ERROR;
|
||||
return;
|
||||
@ -396,7 +396,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
|
||||
if(!enabled) return false;
|
||||
CMasternodePaymentWinner newWinner;
|
||||
int nMinimumAge = mnodeman.CountEnabled();
|
||||
|
||||
|
||||
uint256 hash;
|
||||
if(!GetBlockHash(hash, nBlockHeight-10)) return false;
|
||||
int nHash;
|
||||
|
@ -488,7 +488,7 @@ void CMasternodeMan::ProcessMasternodeConnections()
|
||||
LOCK(cs_vNodes);
|
||||
|
||||
if(!darkSendPool.pSubmittedToMasternode) return;
|
||||
|
||||
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
{
|
||||
if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue;
|
||||
@ -557,7 +557,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
||||
|
||||
if(donationPercentage < 0 || donationPercentage > 100){
|
||||
LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if(protocolVersion < nMasternodeMinProtocol) {
|
||||
|
Loading…
Reference in New Issue
Block a user