mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Unify JSON serialization format of transactions (#4775)
* Remove include <ranges> * Formatting fix * Output for subscriptions * Output from sign, submit etc. * Output from ledger * Output from account_tx * Output from transaction_entry * Output from tx * Store close_time_iso in API v2 output * Add small APIv2 unit test for subscribe * Add unit test for transaction_entry * Add unit test for tx * Remove inLedger from API version 2 * Set ledger_hash and ledger_index * Move isValidated from RPCHelpers to LedgerMaster * Store closeTime in LedgerFill * Time formatting fix * additional tests for Subscribe unit tests * Improved comments * Rename mInLedger to mLedgerIndex * Minor fixes * Set ledger_hash on closed ledger, even if not validated * Update API-CHANGELOG.md * Add ledger_hash, ledger_index to transaction_entry * Fix validated and close_time_iso in account_tx * Fix typos * Improve getJson for Transaction and STTx * Minor improvements * Replace class enum JsonOptions with struct We may consider turning this into a general-purpose template and using it elsewhere * simplify the extraction of transactionID from Transaction object * Remove obsolete comments * Unconditionally set validated in account_tx output * Minor improvements * Minor fixes --------- Co-authored-by: Chenna Keshava <ckeshavabs@gmail.com>
This commit is contained in:
@@ -2536,17 +2536,19 @@ public:
|
||||
// A list of all the functions we want to test.
|
||||
using signFunc = Json::Value (*)(
|
||||
Json::Value params,
|
||||
unsigned int apiVersion,
|
||||
NetworkOPs::FailHard failType,
|
||||
Role role,
|
||||
std::chrono::seconds validatedLedgerAge,
|
||||
Application & app);
|
||||
Application& app);
|
||||
|
||||
using submitFunc = Json::Value (*)(
|
||||
Json::Value params,
|
||||
unsigned int apiVersion,
|
||||
NetworkOPs::FailHard failType,
|
||||
Role role,
|
||||
std::chrono::seconds validatedLedgerAge,
|
||||
Application & app,
|
||||
Application& app,
|
||||
ProcessTransactionFn const& processTransaction,
|
||||
RPC::SubmitSync sync);
|
||||
|
||||
@@ -2586,6 +2588,7 @@ public:
|
||||
assert(get<1>(testFunc) == nullptr);
|
||||
result = signFn(
|
||||
req,
|
||||
1,
|
||||
NetworkOPs::FailHard::yes,
|
||||
testRole,
|
||||
1s,
|
||||
@@ -2597,6 +2600,7 @@ public:
|
||||
assert(submitFn != nullptr);
|
||||
result = submitFn(
|
||||
req,
|
||||
1,
|
||||
NetworkOPs::FailHard::yes,
|
||||
testRole,
|
||||
1s,
|
||||
|
||||
Reference in New Issue
Block a user