Merge branch 'v0.12.0.x_lower_mn_reuse' of https://github.com/UdjinM6/dash into UdjinM6-v0.12.0.x_lower_mn_reuse
This commit is contained in:
commit
665a93cd4f
@ -2408,9 +2408,13 @@ void ThreadCheckDarkSendPool()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(c % 60 == 0){
|
if(c % 60 == 0){
|
||||||
//if we've used 1/5 of the Masternode list, then clear the list.
|
//if we've used 90% of the Masternode list then drop all the oldest.
|
||||||
if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
|
int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
|
||||||
vecMasternodesUsed.clear();
|
if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
|
||||||
|
while((int)vecMasternodesUsed.size() > nThreshold){
|
||||||
|
vecMasternodesUsed.erase(vecMasternodesUsed.begin());
|
||||||
|
if(fDebug) LogPrintf(" vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){
|
if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user