Query the LES, not the Ledger. This should fix the bug where

OfferCreate doesn't take all crossing offers.
This commit is contained in:
JoelKatz
2013-06-10 10:26:58 -07:00
parent cf3593b01b
commit 94a38a30dd

View File

@@ -136,7 +136,7 @@ TER OfferCreateTransactor::takeOffers(
&& saSubTakerPays.isPositive() && saSubTakerPays.isPositive()
&& saSubTakerGets.isPositive()) && saSubTakerGets.isPositive())
{ {
sleOfferDir = mEngine->entryCache(ltDIR_NODE, mEngine->getLedger()->getNextLedgerIndex(uTipIndex, uBookEnd)); sleOfferDir = mEngine->entryCache(ltDIR_NODE, lesActive.getNextLedgerIndex(uTipIndex, uBookEnd));
if (sleOfferDir) if (sleOfferDir)
{ {
uTipIndex = sleOfferDir->getIndex(); uTipIndex = sleOfferDir->getIndex();