Don't report high cluster loads when we're not synched.

This commit is contained in:
JoelKatz
2013-07-23 01:11:51 -07:00
parent cf724bbba7
commit 286158137e

View File

@@ -2354,7 +2354,8 @@ void NetworkOPs::missingNodeInLedger (uint32 seq)
void NetworkOPs::doClusterReport ()
{
ClusterNodeStatus us("", getApp().getFeeTrack().getLocalFee(), getNetworkTimeNC());
bool synced = (getApp().getLedgerMaster().getValidatedLedgerAge() <= 240);
ClusterNodeStatus us("", synced ? getApp().getFeeTrack().getLocalFee() : 0, getNetworkTimeNC());
if (!getApp().getUNL().nodeUpdate(getApp().getLocalCredentials().getNodePublic(), us))
{
WriteLog (lsDEBUG, NetworkOPs) << "To soon to send cluster update";