mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Sync mn list and mnw list from 3 peers max (#2169)
Should solve issues with initial sync and reduce load/bandwidth in general.
This commit is contained in:
parent
2c303cdb11
commit
2474d9cb8c
@ -259,6 +259,12 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
|
||||
return;
|
||||
}
|
||||
|
||||
// request from three peers max
|
||||
if (nRequestedMasternodeAttempt > 2) {
|
||||
connman.ReleaseNodeVector(vNodesCopy);
|
||||
return;
|
||||
}
|
||||
|
||||
// only request once from each peer
|
||||
if(netfulfilledman.HasFulfilledRequest(pnode->addr, "masternode-list-sync")) continue;
|
||||
netfulfilledman.AddFulfilledRequest(pnode->addr, "masternode-list-sync");
|
||||
@ -303,6 +309,12 @@ void CMasternodeSync::ProcessTick(CConnman& connman)
|
||||
return;
|
||||
}
|
||||
|
||||
// request from three peers max
|
||||
if (nRequestedMasternodeAttempt > 2) {
|
||||
connman.ReleaseNodeVector(vNodesCopy);
|
||||
return;
|
||||
}
|
||||
|
||||
// only request once from each peer
|
||||
if(netfulfilledman.HasFulfilledRequest(pnode->addr, "masternode-payment-sync")) continue;
|
||||
netfulfilledman.AddFulfilledRequest(pnode->addr, "masternode-payment-sync");
|
||||
|
Loading…
Reference in New Issue
Block a user