changed some locks
This commit is contained in:
parent
e3d333f8b2
commit
9bafb70a2f
@ -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;
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "main.h"
|
||||
#include "sync.h"
|
||||
#include "activemasternode.h"
|
||||
#include "masternodeman.h"
|
||||
#include "darksend-relay.h"
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user