diff --git a/src/cpp/ripple/OfferCreateTransactor.cpp b/src/cpp/ripple/OfferCreateTransactor.cpp index 9e7593275a..32fe9ca6be 100644 --- a/src/cpp/ripple/OfferCreateTransactor.cpp +++ b/src/cpp/ripple/OfferCreateTransactor.cpp @@ -493,7 +493,7 @@ TER OfferCreateTransactor::doApply() % saTakerPays.getFullText()); // Take using the parameters of the offer. - cLog(lsWARNING) << "OfferCreate: takeOffers: BEFORE saTakerGets=" << saTakerGets.getFullText(); + cLog(lsDEBUG) << "OfferCreate: takeOffers: BEFORE saTakerGets=" << saTakerGets.getFullText(); terResult = takeOffers( bOpenLedger, @@ -614,8 +614,8 @@ TER OfferCreateTransactor::doApply() cLog(lsDEBUG) << "OfferCreate: sfAccount=" << RippleAddress::createHumanAccountID(mTxnAccountID); cLog(lsDEBUG) << "OfferCreate: uPaysIssuerID=" << RippleAddress::createHumanAccountID(uPaysIssuerID); cLog(lsDEBUG) << "OfferCreate: uGetsIssuerID=" << RippleAddress::createHumanAccountID(uGetsIssuerID); - cLog(lsDEBUG) << "OfferCreate: saTakerPays.isNative()=" << saTakerPays.isNative(); - cLog(lsDEBUG) << "OfferCreate: saTakerGets.isNative()=" << saTakerGets.isNative(); + cLog(lsTRACE) << "OfferCreate: saTakerPays.isNative()=" << saTakerPays.isNative(); + cLog(lsTRACE) << "OfferCreate: saTakerGets.isNative()=" << saTakerGets.isNative(); cLog(lsDEBUG) << "OfferCreate: uPaysCurrency=" << saTakerPays.getHumanCurrency(); cLog(lsDEBUG) << "OfferCreate: uGetsCurrency=" << saTakerGets.getHumanCurrency(); diff --git a/src/cpp/ripple/Suppression.h b/src/cpp/ripple/Suppression.h index d401a8f412..876cb833a4 100644 --- a/src/cpp/ripple/Suppression.h +++ b/src/cpp/ripple/Suppression.h @@ -19,6 +19,7 @@ DEFINE_INSTANCE(Suppression); #define SF_SIGGOOD 0x04 // Signature is good #define SF_SAVED 0x08 #define SF_RETRY 0x10 // Transaction can be retried +#define SF_TRUSTED 0x20 // comes from trusted source class Suppression : private IS_INSTANCE(Suppression) { diff --git a/src/cpp/ripple/Transaction.cpp b/src/cpp/ripple/Transaction.cpp index fc044b47a1..494cd172fb 100644 --- a/src/cpp/ripple/Transaction.cpp +++ b/src/cpp/ripple/Transaction.cpp @@ -299,7 +299,8 @@ Json::Value Transaction::getJson(int options, bool binary) const if (mInLedger) { - ret["inLedger"] = mInLedger; + ret["inLedger"] = mInLedger; // Deprecated. + ret["ledger_index"] = mInLedger; if(options == 1) { diff --git a/src/cpp/ripple/TransactionErr.cpp b/src/cpp/ripple/TransactionErr.cpp index 778aa9a06a..7df6880d4d 100644 --- a/src/cpp/ripple/TransactionErr.cpp +++ b/src/cpp/ripple/TransactionErr.cpp @@ -33,12 +33,12 @@ bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman) { tefBAD_GEN_AUTH, "tefBAD_GEN_AUTH", "Not authorized to claim generator." }, { tefBAD_LEDGER, "tefBAD_LEDGER", "Ledger in unexpected state." }, { tefCLAIMED, "tefCLAIMED", "Can not claim a previously claimed account." }, - { tefEXCEPTION, "tefEXCEPTION", "Unexpected program state." }, { tefCREATED, "tefCREATED", "Can't add an already created account." }, + { tefEXCEPTION, "tefEXCEPTION", "Unexpected program state." }, { tefGEN_IN_USE, "tefGEN_IN_USE", "Generator already in use." }, + { tefINTERNAL, "tefINTERNAL", "Internal error." }, { tefNO_AUTH_REQUIRED, "tefNO_AUTH_REQUIRED", "Auth is not required." }, { tefPAST_SEQ, "tefPAST_SEQ", "This sequence number has already past." }, - { tefINTERNAL, "tefINTERNAL", "Internal error." }, { telLOCAL_ERROR, "telLOCAL_ERROR", "Local failure." }, { telBAD_DOMAIN, "telBAD_DOMAIN", "Domain too long." }, diff --git a/src/cpp/ripple/TransactionErr.h b/src/cpp/ripple/TransactionErr.h index 59eea621d7..2d00c2f6ad 100644 --- a/src/cpp/ripple/TransactionErr.h +++ b/src/cpp/ripple/TransactionErr.h @@ -80,9 +80,9 @@ enum TER // aka TransactionEngineResult tefCREATED, tefEXCEPTION, tefGEN_IN_USE, + tefINTERNAL, tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required. tefPAST_SEQ, - tefINTERNAL, // -99 .. -1: R Retry (sequence too high, no funds for txn fee, originating account non-existent) // Causes: diff --git a/src/cpp/ripple/TrustSetTransactor.cpp b/src/cpp/ripple/TrustSetTransactor.cpp index 062778815f..fb7c514a70 100644 --- a/src/cpp/ripple/TrustSetTransactor.cpp +++ b/src/cpp/ripple/TrustSetTransactor.cpp @@ -81,9 +81,9 @@ TER TrustSetTransactor::doApply() return tecNO_DST; } - const uint32 uOwnerCount = mTxnAccount->getFieldU32(sfOwnerCount); + const uint32 uOwnerCount = mTxnAccount->getFieldU32(sfOwnerCount); // The reserve required to create the line. - const uint64 uReserveCreate = mEngine->getLedger()->getReserve(uOwnerCount + 1); + const uint64 uReserveCreate = mEngine->getLedger()->getReserve(uOwnerCount + 1); STAmount saLimitAllow = saLimitAmount; saLimitAllow.setIssuer(mTxnAccountID); diff --git a/src/cpp/ripple/ValidationCollection.cpp b/src/cpp/ripple/ValidationCollection.cpp index b1255c8fb6..cc886276b5 100644 --- a/src/cpp/ripple/ValidationCollection.cpp +++ b/src/cpp/ripple/ValidationCollection.cpp @@ -86,6 +86,8 @@ bool ValidationCollection::addValidation(SerializedValidation::ref val, const st << " added " << (val->isTrusted() ? "trusted/" : "UNtrusted/") << (isCurrent ? "current" : "stale"); if (val->isTrusted()) theApp->getLedgerMaster().checkAccept(hash); + + // FIXME: This never forwards untrusted validations return isCurrent; } @@ -95,7 +97,7 @@ ValidationSet ValidationCollection::getValidations(const uint256& ledger) boost::mutex::scoped_lock sl(mValidationLock); VSpointer set = findSet(ledger); if (set) - return ValidationSet(*set); + return *set; } return ValidationSet(); }