mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
ELB support. Client servers can remove themselves from an ELB pool if loaded
or otherwise broken. Clients won't join an ELB pool until they're stable.
This commit is contained in:
@@ -507,4 +507,36 @@ bool Application::loadOldLedger(const std::string& l)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool serverOkay(std::string& reason)
|
||||
{
|
||||
if (!theConfig.ELB_SUPPORT)
|
||||
return true;
|
||||
|
||||
if (!theApp)
|
||||
{
|
||||
reason = "Server has not started";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (theApp->getOPs().isNeedNetworkLedger())
|
||||
{
|
||||
reason = "Not synchronized with network yet";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (theApp->getOPs().getOperatingMode() < NetworkOPs::omSYNCING)
|
||||
{
|
||||
reason = "Not synchronized with network";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (theApp->getFeeTrack().isLoaded())
|
||||
{
|
||||
reason = "Too much load";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user