changed some locks

This commit is contained in:
Evan Duffield 2015-03-21 20:26:48 -07:00
parent e3d333f8b2
commit 9bafb70a2f
3 changed files with 7 additions and 2 deletions

View File

@ -102,7 +102,8 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
}
} else if (strCommand == "dsq") { //Darksend Queue
TRY_LOCK(cs_darksend);
TRY_LOCK(cs_darksend, lockRecv);
if(!lockRecv) return;
if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
return;

View File

@ -7,6 +7,7 @@
#include "core.h"
#include "main.h"
#include "sync.h"
#include "activemasternode.h"
#include "masternodeman.h"
#include "darksend-relay.h"

View File

@ -7,6 +7,7 @@
#include "darksend.h"
#include "core.h"
#include "util.h"
#include "sync.h"
#include "addrman.h"
#include <boost/lexical_cast.hpp>
@ -222,7 +223,9 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
void CMasternode::Check()
{
TRY_LOCK(cs_main);
//TODO: Random segfault with this line removed
TRY_LOCK(cs_main, lockRecv);
if(!lockRecv) return;
if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD)
{