Don't care about governance cache while the blockchain isn't synced yet (#3089)

`2019-09-14 05:31:13 CGovernanceManager::UpdateCachesAndClean -- Governance Objects: 0 (Proposals: 0, Triggers: 0, Other: 0; Erased: 0), Votes: 0
 59m
 60m
`

Signed-off-by: Pasta <pasta@dashboost.org>
This commit is contained in:
PastaPastaPasta 2019-09-17 07:09:04 -05:00 committed by UdjinM6
parent 0d126c2ae4
commit 1acde17e8a

View File

@ -339,6 +339,11 @@ void CGovernanceManager::AddGovernanceObject(CGovernanceObject& govobj, CConnman
void CGovernanceManager::UpdateCachesAndClean()
{
// Return on initial sync, spammed the debug.log and provided no use
if (!masternodeSync.IsBlockchainSynced()) {
return;
}
LogPrint(BCLog::GOBJECT, "CGovernanceManager::UpdateCachesAndClean\n");
std::vector<uint256> vecDirtyHashes = mmetaman.GetAndClearDirtyGovernanceObjectHashes();