From 62b37ff283011de9689f16006363dd8a84bf6269 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Thu, 7 Mar 2013 17:45:40 -0800 Subject: [PATCH] Another fix for FillOrKill. --- src/cpp/ripple/OfferCreateTransactor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpp/ripple/OfferCreateTransactor.cpp b/src/cpp/ripple/OfferCreateTransactor.cpp index 1a1de1c90..f3251c065 100644 --- a/src/cpp/ripple/OfferCreateTransactor.cpp +++ b/src/cpp/ripple/OfferCreateTransactor.cpp @@ -359,7 +359,7 @@ TER OfferCreateTransactor::doApply() LedgerEntrySet lesCheckpoint = lesActive; // Checkpoint with just fees paid. lesActive.bumpSeq(); // Begin ledger variance. - SLE::pointer slePayment = mEngine->entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(mTxnAccountID)); + SLE::pointer sleCreator = mEngine->entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(mTxnAccountID)); if (uTxFlags & tfOfferCreateMask) { @@ -450,7 +450,7 @@ TER OfferCreateTransactor::doApply() bPassive, uTakeBookBase, mTxnAccountID, - slePayment, + sleCreator, saTakerGets, // Reverse as we are the taker for taking. saTakerPays, saPaid, // How much would have spent at full price. @@ -504,7 +504,7 @@ TER OfferCreateTransactor::doApply() // Complete as is. nothing(); } - else if (mPriorBalance.getNValue() < mEngine->getLedger()->getReserve(mTxnAccount->getFieldU32(sfOwnerCount)+1)) + else if (mPriorBalance.getNValue() < mEngine->getLedger()->getReserve(sleCreator->getFieldU32(sfOwnerCount)+1)) { if (bOpenLedger) // Ledger is not final, can vote no. { @@ -540,7 +540,7 @@ TER OfferCreateTransactor::doApply() if (tesSUCCESS == terResult) { - lesActive.ownerCountAdjust(mTxnAccountID, 1, slePayment); // Update owner count. + lesActive.ownerCountAdjust(mTxnAccountID, 1, sleCreator); // Update owner count. uint256 uBookBase = Ledger::getBookBase(uPaysCurrency, uPaysIssuerID, uGetsCurrency, uGetsIssuerID);