From 1e09e89c28ffa942eb5fdedb5dfcf75c0462bb98 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 16 Apr 2013 11:57:43 -0700 Subject: [PATCH] Small fixes. --- src/cpp/ripple/LedgerEntrySet.cpp | 2 +- src/cpp/ripple/RippleCalc.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cpp/ripple/LedgerEntrySet.cpp b/src/cpp/ripple/LedgerEntrySet.cpp index 7c24e80947..aec83902eb 100644 --- a/src/cpp/ripple/LedgerEntrySet.cpp +++ b/src/cpp/ripple/LedgerEntrySet.cpp @@ -920,7 +920,7 @@ uint256 LedgerEntrySet::getNextLedgerIndex(const uint256& uHash) // node found in LES, node found in ledger, return earliest if (it->second.mAction != taaDELETE) - return (ledgerNext < it->first) ? ledgerNext : it->first; + return (!ledgerNext.isZero() && (ledgerNext < it->first)) ? ledgerNext : it->first; } diff --git a/src/cpp/ripple/RippleCalc.cpp b/src/cpp/ripple/RippleCalc.cpp index 5f1af0f023..67b68bbf40 100644 --- a/src/cpp/ripple/RippleCalc.cpp +++ b/src/cpp/ripple/RippleCalc.cpp @@ -885,10 +885,6 @@ TER RippleCalc::calcNodeAdvance( if (bDirectAdvance) { // Get next quality. - - // FIXME: This looks at the original ledger and doesn't take into account any changes - // in the LedgerEntrySet. If this code, for example, created offers, this would - // not return the pages they're in. uDirectTip = lesActive.getNextLedgerIndex(uDirectTip, uDirectEnd); bDirectDirDirty = true;