Improve LedgerMaster shard acquisition

This commit is contained in:
Miguel Portilla
2020-05-21 18:19:21 -04:00
committed by manojsdoshi
parent 8f50fd051e
commit 91e857874f
8 changed files with 77 additions and 40 deletions

View File

@@ -444,7 +444,8 @@ isValidated(
// Use the skip list in the last validated ledger to see if ledger
// comes before the last validated ledger (and thus has been
// validated).
auto hash = ledgerMaster.walkHashBySeq(seq);
auto hash =
ledgerMaster.walkHashBySeq(seq, InboundLedger::Reason::GENERIC);
if (!hash || ledger.info().hash != *hash)
{

View File

@@ -328,7 +328,8 @@ ShardArchiveHandler::next(std::lock_guard<std::mutex> const& l)
if (auto const seq = app_.getShardStore()->lastLedgerSeq(shardIndex);
(shouldHaveHash = app_.getLedgerMaster().getValidLedgerIndex() > seq))
{
expectedHash = app_.getLedgerMaster().walkHashBySeq(seq);
expectedHash = app_.getLedgerMaster().walkHashBySeq(
seq, InboundLedger::Reason::GENERIC);
}
if (!expectedHash)