diff --git a/CHANGELOG b/CHANGELOG index 5958838c1..a163eceda 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ Critical protocol changes ------------------------- +Mon Apr 8 16:13:12 PDT 2013 +* The JSON field "inLedger" changing to "ledger_index" + +Previous * The JSON field "metaData" changing to "meta". * RPC ledger will no longer take "ledger", use "ledger_hash" or "ledger_index". * "ledgerClose" events: diff --git a/src/cpp/ripple/Transaction.cpp b/src/cpp/ripple/Transaction.cpp index 7d4369e74..3aa09debe 100644 --- a/src/cpp/ripple/Transaction.cpp +++ b/src/cpp/ripple/Transaction.cpp @@ -295,35 +295,21 @@ bool Transaction::convertToTransactions(uint32 firstLedgerSeq, uint32 secondLedg // options 1 to include the date of the transaction Json::Value Transaction::getJson(int options, bool binary) const { - Json::Value ret(mTransaction->getJson(0, binary)); - if (mInLedger) + if (mInLedger) { - ret["inLedger"] = mInLedger; + ret["inLedger"] = mInLedger; // Deprecated. + ret["ledger_index"] = mInLedger; - if(options == 1) + if (options == 1) { Ledger::pointer ledger=theApp->getLedgerMaster().getLedgerBySeq(mInLedger); - if(ledger) + if (ledger) ret["date"] = ledger->getCloseTimeNC(); } } - switch (mStatus) - { - case NEW: ret["status"] = "new"; break; - case INVALID: ret["status"] = "invalid"; break; - case INCLUDED: ret["status"] = "included"; break; - case CONFLICTED: ret["status"] = "conflicted"; break; - case COMMITTED: ret["status"] = "committed"; break; - case HELD: ret["status"] = "held"; break; - case REMOVED: ret["status"] = "removed"; break; - case OBSOLETE: ret["status"] = "obsolete"; break; - case INCOMPLETE: ret["status"] = "incomplete"; break; - default: ret["status"] = "unknown"; break; - } - return ret; }