Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
JoelKatz
2013-03-07 17:48:18 -08:00

View File

@@ -359,7 +359,7 @@ TER OfferCreateTransactor::doApply()
LedgerEntrySet lesCheckpoint = lesActive; // Checkpoint with just fees paid. LedgerEntrySet lesCheckpoint = lesActive; // Checkpoint with just fees paid.
lesActive.bumpSeq(); // Begin ledger variance. 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) if (uTxFlags & tfOfferCreateMask)
{ {
@@ -450,7 +450,7 @@ TER OfferCreateTransactor::doApply()
bPassive, bPassive,
uTakeBookBase, uTakeBookBase,
mTxnAccountID, mTxnAccountID,
slePayment, sleCreator,
saTakerGets, // Reverse as we are the taker for taking. saTakerGets, // Reverse as we are the taker for taking.
saTakerPays, saTakerPays,
saPaid, // How much would have spent at full price. saPaid, // How much would have spent at full price.
@@ -504,7 +504,7 @@ TER OfferCreateTransactor::doApply()
// Complete as is. // Complete as is.
nothing(); 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. if (bOpenLedger) // Ledger is not final, can vote no.
{ {
@@ -540,7 +540,7 @@ TER OfferCreateTransactor::doApply()
if (tesSUCCESS == terResult) 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); uint256 uBookBase = Ledger::getBookBase(uPaysCurrency, uPaysIssuerID, uGetsCurrency, uGetsIssuerID);