perf: Pass const reference Input into handlers (#2409)

Fix https://github.com/XRPLF/clio/issues/2265

---------

Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
This commit is contained in:
emrearıyürek
2025-08-11 13:21:32 +02:00
committed by GitHub
parent 226d386be2
commit 5eea26d9ac
63 changed files with 66 additions and 65 deletions

View File

@@ -69,9 +69,10 @@ concept SomeProcessor = (SomeRequirement<T> or SomeModifier<T>);
* @brief A process function that expects both some Input and a Context. * @brief A process function that expects both some Input and a Context.
*/ */
template <typename T> template <typename T>
concept SomeContextProcessWithInput = requires(T a, typename T::Input in, typename T::Output out, Context const& ctx) { concept SomeContextProcessWithInput =
{ a.process(in, ctx) } -> std::same_as<HandlerReturnType<decltype(out)>>; requires(T a, typename T::Input const& in, typename T::Output out, Context const& ctx) {
}; { a.process(in, ctx) } -> std::same_as<HandlerReturnType<decltype(out)>>;
};
/** /**
* @brief A process function that expects no Input but does take a Context. * @brief A process function that expects no Input but does take a Context.

View File

@@ -77,7 +77,7 @@ toIso8601(ripple::NetClock::time_point tp)
namespace rpc { namespace rpc {
AMMInfoHandler::Result AMMInfoHandler::Result
AMMInfoHandler::process(AMMInfoHandler::Input input, Context const& ctx) const AMMInfoHandler::process(AMMInfoHandler::Input const& input, Context const& ctx) const
{ {
using namespace ripple; using namespace ripple;

View File

@@ -111,7 +111,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -81,7 +81,7 @@ AccountChannelsHandler::addChannel(std::vector<ChannelResponse>& jsonChannels, r
} }
AccountChannelsHandler::Result AccountChannelsHandler::Result
AccountChannelsHandler::process(AccountChannelsHandler::Input input, Context const& ctx) const AccountChannelsHandler::process(AccountChannelsHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountChannel's ledger range must be available"); ASSERT(range.has_value(), "AccountChannel's ledger range must be available");

View File

@@ -145,7 +145,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
static void static void

View File

@@ -43,7 +43,7 @@
namespace rpc { namespace rpc {
AccountCurrenciesHandler::Result AccountCurrenciesHandler::Result
AccountCurrenciesHandler::process(AccountCurrenciesHandler::Input input, Context const& ctx) const AccountCurrenciesHandler::process(AccountCurrenciesHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountCurrencies' ledger range must be available"); ASSERT(range.has_value(), "AccountCurrencies' ledger range must be available");

View File

@@ -110,7 +110,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -50,7 +50,7 @@
namespace rpc { namespace rpc {
AccountInfoHandler::Result AccountInfoHandler::Result
AccountInfoHandler::process(AccountInfoHandler::Input input, Context const& ctx) const AccountInfoHandler::process(AccountInfoHandler::Input const& input, Context const& ctx) const
{ {
using namespace data; using namespace data;

View File

@@ -159,7 +159,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -130,7 +130,7 @@ AccountLinesHandler::addLine(
} }
AccountLinesHandler::Result AccountLinesHandler::Result
AccountLinesHandler::process(AccountLinesHandler::Input input, Context const& ctx) const AccountLinesHandler::process(AccountLinesHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountLines' ledger range must be available"); ASSERT(range.has_value(), "AccountLines' ledger range must be available");

View File

@@ -160,7 +160,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
static void static void

View File

@@ -49,7 +49,7 @@
namespace rpc { namespace rpc {
AccountNFTsHandler::Result AccountNFTsHandler::Result
AccountNFTsHandler::process(AccountNFTsHandler::Input input, Context const& ctx) const AccountNFTsHandler::process(AccountNFTsHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountNFT's ledger range must be available"); ASSERT(range.has_value(), "AccountNFT's ledger range must be available");

View File

@@ -118,7 +118,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -49,7 +49,7 @@
namespace rpc { namespace rpc {
AccountObjectsHandler::Result AccountObjectsHandler::Result
AccountObjectsHandler::process(AccountObjectsHandler::Input input, Context const& ctx) const AccountObjectsHandler::process(AccountObjectsHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountObject's ledger range must be available"); ASSERT(range.has_value(), "AccountObject's ledger range must be available");

View File

@@ -134,7 +134,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -65,7 +65,7 @@ AccountOffersHandler::addOffer(std::vector<Offer>& offers, ripple::SLE const& of
}; };
AccountOffersHandler::Result AccountOffersHandler::Result
AccountOffersHandler::process(AccountOffersHandler::Input input, Context const& ctx) const AccountOffersHandler::process(AccountOffersHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountOffer's ledger range must be available"); ASSERT(range.has_value(), "AccountOffer's ledger range must be available");

View File

@@ -135,7 +135,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
static void static void

View File

@@ -52,7 +52,7 @@ namespace rpc {
// TODO: this is currently very similar to nft_history but its own copy for time // TODO: this is currently very similar to nft_history but its own copy for time
// being. we should aim to reuse common logic in some way in the future. // being. we should aim to reuse common logic in some way in the future.
AccountTxHandler::Result AccountTxHandler::Result
AccountTxHandler::process(AccountTxHandler::Input input, Context const& ctx) const AccountTxHandler::process(AccountTxHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "AccountTX's ledger range must be available"); ASSERT(range.has_value(), "AccountTX's ledger range must be available");

View File

@@ -178,7 +178,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -41,7 +41,7 @@
namespace rpc { namespace rpc {
BookChangesHandler::Result BookChangesHandler::Result
BookChangesHandler::process(BookChangesHandler::Input input, Context const& ctx) const BookChangesHandler::process(BookChangesHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "BookChanges' ledger range must be available"); ASSERT(range.has_value(), "BookChanges' ledger range must be available");

View File

@@ -104,7 +104,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -42,7 +42,7 @@
namespace rpc { namespace rpc {
BookOffersHandler::Result BookOffersHandler::Result
BookOffersHandler::process(Input input, Context const& ctx) const BookOffersHandler::process(Input const& input, Context const& ctx) const
{ {
auto bookMaybe = parseBook(input.paysCurrency, input.paysID, input.getsCurrency, input.getsID, input.domain); auto bookMaybe = parseBook(input.paysCurrency, input.paysID, input.getsCurrency, input.getsID, input.domain);
if (!bookMaybe.has_value()) if (!bookMaybe.has_value())

View File

@@ -175,7 +175,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -49,7 +49,7 @@
namespace rpc { namespace rpc {
DepositAuthorizedHandler::Result DepositAuthorizedHandler::Result
DepositAuthorizedHandler::process(DepositAuthorizedHandler::Input input, Context const& ctx) const DepositAuthorizedHandler::process(DepositAuthorizedHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "DepositAuthorized ledger range must be available"); ASSERT(range.has_value(), "DepositAuthorized ledger range must be available");

View File

@@ -118,7 +118,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -50,7 +50,7 @@
namespace rpc { namespace rpc {
FeatureHandler::Result FeatureHandler::Result
FeatureHandler::process(FeatureHandler::Input input, Context const& ctx) const FeatureHandler::process(FeatureHandler::Input const& input, Context const& ctx) const
{ {
namespace vs = std::views; namespace vs = std::views;
namespace rg = std::ranges; namespace rg = std::ranges;

View File

@@ -111,7 +111,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; // NOLINT(readability-convert-member-functions-to-static) process(Input const& input, Context const& ctx) const; // NOLINT(readability-convert-member-functions-to-static)
private: private:
/** /**

View File

@@ -55,7 +55,7 @@
namespace rpc { namespace rpc {
GatewayBalancesHandler::Result GatewayBalancesHandler::Result
GatewayBalancesHandler::process(GatewayBalancesHandler::Input input, Context const& ctx) const GatewayBalancesHandler::process(GatewayBalancesHandler::Input const& input, Context const& ctx) const
{ {
// check ledger // check ledger
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();

View File

@@ -164,7 +164,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -58,7 +58,7 @@
namespace rpc { namespace rpc {
GetAggregatePriceHandler::Result GetAggregatePriceHandler::Result
GetAggregatePriceHandler::process(GetAggregatePriceHandler::Input input, Context const& ctx) const GetAggregatePriceHandler::process(GetAggregatePriceHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "GetAggregatePrice's ledger range must be available"); ASSERT(range.has_value(), "GetAggregatePrice's ledger range must be available");

View File

@@ -198,7 +198,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -48,7 +48,7 @@
namespace rpc { namespace rpc {
LedgerHandler::Result LedgerHandler::Result
LedgerHandler::process(LedgerHandler::Input input, Context const& ctx) const LedgerHandler::process(LedgerHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "LedgerHandler's ledger range must be available"); ASSERT(range.has_value(), "LedgerHandler's ledger range must be available");

View File

@@ -139,7 +139,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -51,7 +51,7 @@
namespace rpc { namespace rpc {
LedgerDataHandler::Result LedgerDataHandler::Result
LedgerDataHandler::process(Input input, Context const& ctx) const LedgerDataHandler::process(Input const& input, Context const& ctx) const
{ {
// marker must be int if outOfOrder is true // marker must be int if outOfOrder is true
if (input.outOfOrder && input.marker) if (input.outOfOrder && input.marker)

View File

@@ -141,7 +141,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -58,7 +58,7 @@
namespace rpc { namespace rpc {
LedgerEntryHandler::Result LedgerEntryHandler::Result
LedgerEntryHandler::process(LedgerEntryHandler::Input input, Context const& ctx) const LedgerEntryHandler::process(LedgerEntryHandler::Input const& input, Context const& ctx) const
{ {
ripple::uint256 key; ripple::uint256 key;

View File

@@ -443,7 +443,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
// dir_root and owner can not be both empty or filled at the same time // dir_root and owner can not be both empty or filled at the same time

View File

@@ -40,7 +40,7 @@
namespace rpc { namespace rpc {
LedgerIndexHandler::Result LedgerIndexHandler::Result
LedgerIndexHandler::process(LedgerIndexHandler::Input input, Context const& ctx) const LedgerIndexHandler::process(LedgerIndexHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "LedgerIndex's ledger range must be available"); ASSERT(range.has_value(), "LedgerIndex's ledger range must be available");

View File

@@ -94,7 +94,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -46,7 +46,7 @@ using namespace ripple;
namespace rpc { namespace rpc {
MPTHoldersHandler::Result MPTHoldersHandler::Result
MPTHoldersHandler::process(MPTHoldersHandler::Input input, Context const& ctx) const MPTHoldersHandler::process(MPTHoldersHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "MPTHolder's ledger range must be available"); ASSERT(range.has_value(), "MPTHolder's ledger range must be available");

View File

@@ -114,7 +114,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -29,7 +29,7 @@ using namespace ripple;
namespace rpc { namespace rpc {
NFTBuyOffersHandler::Result NFTBuyOffersHandler::Result
NFTBuyOffersHandler::process(NFTBuyOffersHandler::Input input, Context const& ctx) const NFTBuyOffersHandler::process(NFTBuyOffersHandler::Input const& input, Context const& ctx) const
{ {
auto const tokenID = uint256{input.nftID.c_str()}; auto const tokenID = uint256{input.nftID.c_str()};
auto const directory = keylet::nft_buys(tokenID); auto const directory = keylet::nft_buys(tokenID);

View File

@@ -52,6 +52,6 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
}; };
} // namespace rpc } // namespace rpc

View File

@@ -50,7 +50,7 @@ namespace rpc {
// TODO: this is currently very similar to account_tx but its own copy for time // TODO: this is currently very similar to account_tx but its own copy for time
// being. we should aim to reuse common logic in some way in the future. // being. we should aim to reuse common logic in some way in the future.
NFTHistoryHandler::Result NFTHistoryHandler::Result
NFTHistoryHandler::process(NFTHistoryHandler::Input input, Context const& ctx) const NFTHistoryHandler::process(NFTHistoryHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "NFTHistory's ledger range must be available"); ASSERT(range.has_value(), "NFTHistory's ledger range must be available");

View File

@@ -151,7 +151,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -43,7 +43,7 @@ using namespace ripple;
namespace rpc { namespace rpc {
NFTInfoHandler::Result NFTInfoHandler::Result
NFTInfoHandler::process(NFTInfoHandler::Input input, Context const& ctx) const NFTInfoHandler::process(NFTInfoHandler::Input const& input, Context const& ctx) const
{ {
auto const tokenID = ripple::uint256{input.nftID.c_str()}; auto const tokenID = ripple::uint256{input.nftID.c_str()};
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();

View File

@@ -111,7 +111,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -29,7 +29,7 @@ using namespace ripple;
namespace rpc { namespace rpc {
NFTSellOffersHandler::Result NFTSellOffersHandler::Result
NFTSellOffersHandler::process(NFTSellOffersHandler::Input input, Context const& ctx) const NFTSellOffersHandler::process(NFTSellOffersHandler::Input const& input, Context const& ctx) const
{ {
auto const tokenID = uint256{input.nftID.c_str()}; auto const tokenID = uint256{input.nftID.c_str()};
auto const directory = keylet::nft_sells(tokenID); auto const directory = keylet::nft_sells(tokenID);

View File

@@ -52,7 +52,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
}; };
} // namespace rpc } // namespace rpc

View File

@@ -45,7 +45,7 @@ using namespace ripple;
namespace rpc { namespace rpc {
NFTsByIssuerHandler::Result NFTsByIssuerHandler::Result
NFTsByIssuerHandler::process(NFTsByIssuerHandler::Input input, Context const& ctx) const NFTsByIssuerHandler::process(NFTsByIssuerHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "NFTsByIssuer's ledger range must be available"); ASSERT(range.has_value(), "NFTsByIssuer's ledger range must be available");

View File

@@ -117,7 +117,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -55,7 +55,7 @@
namespace rpc { namespace rpc {
NoRippleCheckHandler::Result NoRippleCheckHandler::Result
NoRippleCheckHandler::process(NoRippleCheckHandler::Input input, Context const& ctx) const NoRippleCheckHandler::process(NoRippleCheckHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "NoRippleCheck's ledger range must be available"); ASSERT(range.has_value(), "NoRippleCheck's ledger range must be available");

View File

@@ -137,7 +137,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -187,7 +187,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const process(Input const& input, Context const& ctx) const
{ {
using namespace rpc; using namespace rpc;
using namespace std::chrono; using namespace std::chrono;

View File

@@ -112,7 +112,7 @@ SubscribeHandler::spec([[maybe_unused]] uint32_t apiVersion)
} }
SubscribeHandler::Result SubscribeHandler::Result
SubscribeHandler::process(Input input, Context const& ctx) const SubscribeHandler::process(Input const& input, Context const& ctx) const
{ {
auto output = Output{}; auto output = Output{};

View File

@@ -126,7 +126,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
boost::json::object boost::json::object

View File

@@ -39,7 +39,7 @@
namespace rpc { namespace rpc {
TransactionEntryHandler::Result TransactionEntryHandler::Result
TransactionEntryHandler::process(TransactionEntryHandler::Input input, Context const& ctx) const TransactionEntryHandler::process(TransactionEntryHandler::Input const& input, Context const& ctx) const
{ {
auto const range = sharedPtrBackend_->fetchLedgerRange(); auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "TransactionEntry's ledger range must be available"); ASSERT(range.has_value(), "TransactionEntry's ledger range must be available");

View File

@@ -111,7 +111,7 @@ public:
* @return The result of the command * @return The result of the command
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**

View File

@@ -138,7 +138,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const process(Input const& input, Context const& ctx) const
{ {
if (input.ctid && input.transaction) // ambiguous identifier if (input.ctid && input.transaction) // ambiguous identifier
return Error{Status{RippledError::rpcINVALID_PARAMS}}; return Error{Status{RippledError::rpcINVALID_PARAMS}};

View File

@@ -86,7 +86,7 @@ UnsubscribeHandler::spec([[maybe_unused]] uint32_t apiVersion)
} }
UnsubscribeHandler::Result UnsubscribeHandler::Result
UnsubscribeHandler::process(Input input, Context const& ctx) const UnsubscribeHandler::process(Input const& input, Context const& ctx) const
{ {
if (input.streams) if (input.streams)
unsubscribeFromStreams(*(input.streams), ctx.session); unsubscribeFromStreams(*(input.streams), ctx.session);

View File

@@ -96,7 +96,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
void void

View File

@@ -75,7 +75,7 @@ VaultInfoHandler::VaultInfoHandler(std::shared_ptr<BackendInterface> const& shar
} }
VaultInfoHandler::Result VaultInfoHandler::Result
VaultInfoHandler::process(VaultInfoHandler::Input input, Context const& ctx) const VaultInfoHandler::process(VaultInfoHandler::Input const& input, Context const& ctx) const
{ {
// vault info input must either have owner and sequence, or vault_id only. // vault info input must either have owner and sequence, or vault_id only.
if (not validate(input)) if (not validate(input))

View File

@@ -109,7 +109,7 @@ public:
* @return The result of the operation * @return The result of the operation
*/ */
Result Result
process(Input input, Context const& ctx) const; process(Input const& input, Context const& ctx) const;
private: private:
/** /**