mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Apply transaction batches in periodic intervals (#4504)
Add new transaction submission API field, "sync", which determines behavior of the server while submitting transactions: 1) sync (default): Process transactions in a batch immediately, and return only once the transaction has been processed. 2) async: Put transaction into the batch for the next processing interval and return immediately. 3) wait: Put transaction into the batch for the next processing interval and return only after it is processed.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <ripple/app/misc/LoadFeeTrack.h>
|
||||
#include <ripple/app/misc/TxQ.h>
|
||||
#include <ripple/basics/SubmitSync.h>
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/beast/unit_test.h>
|
||||
#include <ripple/core/ConfigSections.h>
|
||||
@@ -2384,7 +2385,7 @@ public:
|
||||
fakeProcessTransaction(
|
||||
std::shared_ptr<Transaction>&,
|
||||
bool,
|
||||
bool,
|
||||
SubmitSync,
|
||||
NetworkOPs::FailHard)
|
||||
{
|
||||
;
|
||||
@@ -2432,7 +2433,8 @@ public:
|
||||
Role role,
|
||||
std::chrono::seconds validatedLedgerAge,
|
||||
Application & app,
|
||||
ProcessTransactionFn const& processTransaction);
|
||||
ProcessTransactionFn const& processTransaction,
|
||||
RPC::SubmitSync sync);
|
||||
|
||||
using TestStuff =
|
||||
std::tuple<signFunc, submitFunc, char const*, unsigned int>;
|
||||
@@ -2485,7 +2487,8 @@ public:
|
||||
testRole,
|
||||
1s,
|
||||
env.app(),
|
||||
processTxn);
|
||||
processTxn,
|
||||
RPC::SubmitSync::sync);
|
||||
}
|
||||
|
||||
std::string errStr;
|
||||
|
||||
Reference in New Issue
Block a user