From 78f058d710371caf491d089739619ecdf2c8ad6a Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 15 Feb 2013 09:32:24 -0800 Subject: [PATCH] Add a 'validated' field to the 'tx' output. If true, the transaction metadata came from a fully-validated ledger. --- src/cpp/ripple/RPCHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index a0a99df84..cb66d043d 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1448,6 +1448,9 @@ Json::Value RPCHandler::doTx(Json::Value jvRequest) TransactionMetaSet::pointer set; if (lgr->getTransactionMeta(txid, set)) ret["meta"] = set->getJson(0); + ret["validated"] = + theApp->getOPs().haveLedger(lgr->getLedgerSeq()) && + (lgr->getLedgerSeq() >= theApp->getLedgerMaster().getValidatedLedger()->getLedgerSeq()); } }