Fix deadlock in governance on cs_main (#1303)

This commit is contained in:
Tim Flynn 2017-02-01 18:07:24 -05:00 committed by UdjinM6
parent 3bfa5392fa
commit 944420deb0

View File

@ -879,7 +879,7 @@ bool CGovernanceManager::ProcessVote(CNode* pfrom, const CGovernanceVote& vote,
void CGovernanceManager::CheckMasternodeOrphanVotes()
{
LOCK(cs);
LOCK2(cs_main, cs);
fRateChecksEnabled = false;
for(object_m_it it = mapObjects.begin(); it != mapObjects.end(); ++it) {
it->second.CheckOrphanVotes();
@ -889,7 +889,7 @@ void CGovernanceManager::CheckMasternodeOrphanVotes()
void CGovernanceManager::CheckMasternodeOrphanObjects()
{
LOCK(cs);
LOCK2(cs_main, cs);
int64_t nNow = GetAdjustedTime();
fRateChecksEnabled = false;
object_time_m_it it = mapMasternodeOrphanObjects.begin();