Ledger acquire fixes/cleanups/logging

* Inbound ledger and SHAMapAddNode cleanup
    * Log acquire stats
    * Fix progress logic
    * Remove ledgers we no longer need to acquire
    * Stash stale state data in our fetch pack, it can still be useful
    * Stash in fetch pack if acquire terminated while job was pending
    * Account for duplicate/invalid nodes in a few cases previously missed
    * Dispatch each InboundLedger once (not per data)
    * Trigger only the "best" peer
    * Don't call tryAdvance on failed acquires
This commit is contained in:
JoelKatz
2013-12-14 20:16:54 -08:00
committed by Vinnie Falco
parent 9bdb0774ad
commit b2dbe8ef83
14 changed files with 515 additions and 294 deletions

View File

@@ -122,7 +122,7 @@ private:
WriteLog (lsDEBUG, Validations) << "Val for " << hash << " from " << signer.humanNodePublic ()
<< " added " << (val->isTrusted () ? "trusted/" : "UNtrusted/") << (isCurrent ? "current" : "stale");
if (val->isTrusted ())
if (val->isTrusted () && isCurrent)
getApp().getLedgerMaster ().checkAccept (hash);
// FIXME: This never forwards untrusted validations