Another fix for FillOrKill.

This commit is contained in:
Arthur Britto
2013-03-07 17:45:40 -08:00
parent f8799a6558
commit 62b37ff283

View File

@@ -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);