mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
Merge branch 'UdjinM6-v0.12.0.x_lower_mn_reuse' into v0.12.0.x
This commit is contained in:
commit
907aa36ed1
@ -2408,9 +2408,13 @@ void ThreadCheckDarkSendPool()
|
||||
}
|
||||
|
||||
if(c % 60 == 0){
|
||||
//if we've used 1/5 of the Masternode list, then clear the list.
|
||||
if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
|
||||
vecMasternodesUsed.clear();
|
||||
//if we've used 90% of the Masternode list then drop all the oldest.
|
||||
int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
|
||||
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){
|
||||
|
Loading…
Reference in New Issue
Block a user