Prevent simultaneous outgoing async peer messages:

* Also, only send validator list on incoming connection instead of both
  incoming and outgoing.
This commit is contained in:
Edward Hennis
2020-12-23 14:19:25 -05:00
parent 746181cb33
commit 0dae22adf2
2 changed files with 39 additions and 35 deletions

View File

@@ -1480,8 +1480,6 @@ ApplicationImp::setup()
return false;
}
validatorSites_->start();
// start first consensus round
if (!m_networkOPs->beginConsensus(
m_ledgerMaster->getClosedLedger()->info().hash))
@@ -1595,6 +1593,7 @@ ApplicationImp::setup()
}
}
RPC::ShardArchiveHandler* shardArchiveHandler = nullptr;
if (shardStore_)
{
try
@@ -1606,15 +1605,7 @@ ApplicationImp::setup()
// Recovery is needed.
if (handler)
{
if (!handler->start())
{
JLOG(m_journal.fatal())
<< "Failed to start ShardArchiveHandler.";
return false;
}
}
shardArchiveHandler = handler;
}
catch (std::exception const& e)
{
@@ -1627,6 +1618,15 @@ ApplicationImp::setup()
}
}
if (shardArchiveHandler && !shardArchiveHandler->start())
{
JLOG(m_journal.fatal()) << "Failed to start ShardArchiveHandler.";
return false;
}
validatorSites_->start();
return true;
}