Acquire logic fixes:

In InboundLedgers::acquire, properly return a ledger if we are
able to create one immediately.

In LedgerMaster::walkHashBySeq, don't walk the whole ledger if
we already know we have it.
This commit is contained in:
Nik Bougalis
2015-06-09 01:40:24 -07:00
parent 2904add428
commit e980e69eca
5 changed files with 66 additions and 30 deletions

View File

@@ -352,7 +352,7 @@ public:
{
// No, Try to get another ledger that might have the hash we need
// Compute the index and hash of a ledger that will have the hash we need
LedgerIndex refIndex = (ledgerIndex + 255) & (~255);
LedgerIndex refIndex = getCandidateLedger (ledgerIndex);
LedgerHash refHash = getLedgerHash (referenceLedger, refIndex);
bool const nonzero (refHash.isNonZero ());