From 94a38a30ddcfb4791505ba803c13f4985d130d14 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 10 Jun 2013 10:26:58 -0700 Subject: [PATCH] Query the LES, not the Ledger. This should fix the bug where OfferCreate doesn't take all crossing offers. --- src/cpp/ripple/OfferCreateTransactor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/ripple/OfferCreateTransactor.cpp b/src/cpp/ripple/OfferCreateTransactor.cpp index c10f248d5c..3e7112c487 100644 --- a/src/cpp/ripple/OfferCreateTransactor.cpp +++ b/src/cpp/ripple/OfferCreateTransactor.cpp @@ -136,7 +136,7 @@ TER OfferCreateTransactor::takeOffers( && saSubTakerPays.isPositive() && saSubTakerGets.isPositive()) { - sleOfferDir = mEngine->entryCache(ltDIR_NODE, mEngine->getLedger()->getNextLedgerIndex(uTipIndex, uBookEnd)); + sleOfferDir = mEngine->entryCache(ltDIR_NODE, lesActive.getNextLedgerIndex(uTipIndex, uBookEnd)); if (sleOfferDir) { uTipIndex = sleOfferDir->getIndex();