diff --git a/src/ripple_app/ledger/OrderBookIterator.cpp b/src/ripple_app/ledger/OrderBookIterator.cpp index 384d957c5b..e371f013ea 100644 --- a/src/ripple_app/ledger/OrderBookIterator.cpp +++ b/src/ripple_app/ledger/OrderBookIterator.cpp @@ -179,16 +179,15 @@ bool OrderBookIterator::nextOffer () return true; } - // Is there a next directory + // Is there a next directory + if (!mDirectoryIterator.nextDirectory (mEntrySet)) + { + WriteLog (lsTRACE, Ledger) << "OrderBookIterator: there is no next directory"; + return false; + } + WriteLog (lsTRACE, Ledger) << "OrderBookIterator: going to next directory"; - if (!mDirectoryIterator.nextDirectory (mEntrySet)) - { - WriteLog (lsTRACE, Ledger) << "OrderBookIterator: there is no next directory"; - return false; - } - WriteLog (lsTRACE, Ledger) << "OrderBookIterator: going to next directory"; - - // Set to before its first offer + // Set to before its first offer mOfferIterator = mDirectoryIterator.getOfferIterator (); } while (1); diff --git a/src/ripple_app/tx/OfferCreateTransactor.cpp b/src/ripple_app/tx/OfferCreateTransactor.cpp index 1ca1448e3b..d15bdd61fa 100644 --- a/src/ripple_app/tx/OfferCreateTransactor.cpp +++ b/src/ripple_app/tx/OfferCreateTransactor.cpp @@ -151,7 +151,7 @@ TER OfferCreateTransactor::takeOffers ( STAmount saTakerFunds = lesActive.accountFunds (uTakerAccountID, saTakerPays); STAmount saSubTakerPays = saTakerPays - saTakerPaid; // How much more to spend. STAmount saSubTakerGets = saTakerGets - saTakerGot; // How much more is wanted. - uint64 uTipQuality = bookIterator.getCurrentQuality(); + uint64 uTipQuality = bookIterator.getCurrentQuality(); if (!saTakerFunds.isPositive ()) {