If we detect a missing node in a ledger we're supposed to have full,

re-acquire that ledger to fill the hole.
This commit is contained in:
JoelKatz
2013-05-08 15:55:52 -07:00
parent ddcebec5a5
commit 41b70c76da
6 changed files with 24 additions and 2 deletions

View File

@@ -2124,4 +2124,12 @@ void NetworkOPs::gotFetchPack(bool progress, uint32 seq)
boost::bind(&LedgerAcquireMaster::gotFetchPack, &theApp->getMasterLedgerAcquire(), _1));
}
void NetworkOPs::missingNodeInLedger(uint32 seq)
{
cLog(lsWARNING) << "We are missing a node in ledger " << seq;
uint256 hash = theApp->getLedgerMaster().getHashBySeq(seq);
if (hash.isNonZero())
theApp->getMasterLedgerAcquire().findCreate(hash, seq);
}
// vim:ts=4