diff --git a/src/ripple/app/ledger/impl/LedgerToJson.cpp b/src/ripple/app/ledger/impl/LedgerToJson.cpp index 54ca621f2b..d7917204de 100644 --- a/src/ripple/app/ledger/impl/LedgerToJson.cpp +++ b/src/ripple/app/ledger/impl/LedgerToJson.cpp @@ -65,14 +65,17 @@ void fillJson(Object& json, LedgerInfo const& info, bool bFull) json[jss::hash] = to_string (info.hash); json[jss::totalCoins] = to_string (info.drops); json[jss::accepted] = ! info.open; + json[jss::close_flags] = info.closeFlags; + + // Always show fields that contribute to the ledger hash + json[jss::parent_close_time] = info.parentCloseTime; + json[jss::close_time] = info.closeTime; + json[jss::close_time_resolution] = info.closeTimeResolution; if (auto closeTime = info.closeTime) { - json[jss::close_time] = closeTime; json[jss::close_time_human] = boost::posix_time::to_simple_string ( ptFromSeconds (closeTime)); - json[jss::close_time_resolution] = info.closeTimeResolution; - if (! getCloseAgree(info)) json[jss::close_time_estimated] = true; } diff --git a/src/ripple/protocol/JsonFields.h b/src/ripple/protocol/JsonFields.h index 4304cc5ee6..26ed7908d9 100644 --- a/src/ripple/protocol/JsonFields.h +++ b/src/ripple/protocol/JsonFields.h @@ -96,6 +96,7 @@ JSS ( build_version ); // out: NetworkOPs JSS ( can_delete ); // out: CanDelete JSS ( check_nodes ); // in: LedgerCleaner JSS ( clear ); // in/out: FetchInfo +JSS ( close_flags ); // out: LedgerToJson JSS ( close_time ); // in: Application, out: NetworkOPs, // LedgerProposal, LedgerToJson JSS ( close_time_estimated ); // in: Application, out: LedgerToJson @@ -262,6 +263,7 @@ JSS ( open ); // out: handlers/Ledger JSS ( owner ); // in: LedgerEntry, out: NetworkOPs JSS ( owner_funds ); // out: NetworkOPs, AcceptedLedgerTx JSS ( params ); // RPC +JSS ( parent_close_time ); // out: LedgerToJson JSS ( parent_hash ); // out: LedgerToJson JSS ( partition ); // in: LogLevel JSS ( passphrase ); // in: WalletPropose