Fix deadlock in governance on cs_main (#1303)
This commit is contained in:
parent
3bfa5392fa
commit
944420deb0
@ -879,7 +879,7 @@ bool CGovernanceManager::ProcessVote(CNode* pfrom, const CGovernanceVote& vote,
|
|||||||
|
|
||||||
void CGovernanceManager::CheckMasternodeOrphanVotes()
|
void CGovernanceManager::CheckMasternodeOrphanVotes()
|
||||||
{
|
{
|
||||||
LOCK(cs);
|
LOCK2(cs_main, cs);
|
||||||
fRateChecksEnabled = false;
|
fRateChecksEnabled = false;
|
||||||
for(object_m_it it = mapObjects.begin(); it != mapObjects.end(); ++it) {
|
for(object_m_it it = mapObjects.begin(); it != mapObjects.end(); ++it) {
|
||||||
it->second.CheckOrphanVotes();
|
it->second.CheckOrphanVotes();
|
||||||
@ -889,7 +889,7 @@ void CGovernanceManager::CheckMasternodeOrphanVotes()
|
|||||||
|
|
||||||
void CGovernanceManager::CheckMasternodeOrphanObjects()
|
void CGovernanceManager::CheckMasternodeOrphanObjects()
|
||||||
{
|
{
|
||||||
LOCK(cs);
|
LOCK2(cs_main, cs);
|
||||||
int64_t nNow = GetAdjustedTime();
|
int64_t nNow = GetAdjustedTime();
|
||||||
fRateChecksEnabled = false;
|
fRateChecksEnabled = false;
|
||||||
object_time_m_it it = mapMasternodeOrphanObjects.begin();
|
object_time_m_it it = mapMasternodeOrphanObjects.begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user