Clear seen on boot and everyday
This commit is contained in:
parent
7d51866b9d
commit
e8ba7328f0
@ -1442,6 +1442,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
|
|
||||||
//flag our cached items so we send them to our peers
|
//flag our cached items so we send them to our peers
|
||||||
budget.ResetSync();
|
budget.ResetSync();
|
||||||
|
budget.ClearSeen();
|
||||||
|
|
||||||
|
|
||||||
uiInterface.InitMessage(_("Loading masternode payment cache..."));
|
uiInterface.InitMessage(_("Loading masternode payment cache..."));
|
||||||
|
@ -785,7 +785,10 @@ void CBudgetManager::NewBlock()
|
|||||||
// incremental sync with our peers
|
// incremental sync with our peers
|
||||||
if(masternodeSync.IsSynced()){
|
if(masternodeSync.IsSynced()){
|
||||||
LogPrintf("CBudgetManager::NewBlock - incremental sync started");
|
LogPrintf("CBudgetManager::NewBlock - incremental sync started");
|
||||||
if(chainActive.Height() % 600 == rand() % 600) ResetSync();
|
if(chainActive.Height() % 600 == rand() % 600) {
|
||||||
|
ClearSeen();
|
||||||
|
ResetSync();
|
||||||
|
}
|
||||||
|
|
||||||
LOCK(cs_vNodes);
|
LOCK(cs_vNodes);
|
||||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||||
|
@ -102,6 +102,13 @@ public:
|
|||||||
mapFinalizedBudgets.clear();
|
mapFinalizedBudgets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClearSeen() {
|
||||||
|
mapSeenMasternodeBudgetProposals.clear();
|
||||||
|
mapSeenMasternodeBudgetVotes.clear();
|
||||||
|
mapSeenFinalizedBudgets.clear();
|
||||||
|
mapSeenFinalizedBudgetVotes.clear();
|
||||||
|
}
|
||||||
|
|
||||||
int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
|
int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
|
||||||
int sizeProposals() {return (int)mapProposals.size();}
|
int sizeProposals() {return (int)mapProposals.size();}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user