Add Shard pool management

This commit is contained in:
Miguel Portilla
2020-04-06 15:34:27 -04:00
committed by manojsdoshi
parent d282b0bf85
commit 03c809371a
32 changed files with 2018 additions and 1555 deletions

View File

@@ -1241,8 +1241,7 @@ private:
bool
nodeToShards();
bool
validateShards();
void
startGenesisLedger();
@@ -1476,12 +1475,9 @@ ApplicationImp::setup()
if (!config_->standalone())
{
// validation and node import require the sqlite db
// NodeStore import into the ShardStore requires the SQLite database
if (config_->nodeToShard && !nodeToShards())
return false;
if (config_->validateShards && !validateShards())
return false;
}
validatorSites_->start();
@@ -2173,27 +2169,6 @@ ApplicationImp::nodeToShards()
return true;
}
bool
ApplicationImp::validateShards()
{
assert(overlay_);
assert(!config_->standalone());
if (config_->section(ConfigSection::shardDatabase()).empty())
{
JLOG(m_journal.fatal())
<< "The [shard_db] configuration setting must be set";
return false;
}
if (!shardStore_)
{
JLOG(m_journal.fatal()) << "Invalid [shard_db] configuration";
return false;
}
shardStore_->validate();
return true;
}
void
ApplicationImp::setMaxDisallowedLedger()
{