MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TransformParams

Method TransformParams

src/test/rpc_tests.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54UniValue RPCTestingSetup::TransformParams(const UniValue& params, std::vector<std::pair<std::string, bool>> arg_names) const
55{
56 UniValue transformed_params;
57 CRPCTable table;
58 CRPCCommand command{"category", "method", [&](const JSONRPCRequest& request, UniValue&, bool) -> bool { transformed_params = request.params; return true; }, arg_names, /*unique_id=*/0};
59 table.appendCommand("method", &command);
60 JSONRPCRequest request;
61 request.strMethod = "method";
62 request.params = params;
63 if (RPCIsInWarmup(nullptr)) SetRPCWarmupFinished();
64 table.execute(request);
65 return transformed_params;
66}
67
68UniValue RPCTestingSetup::CallRPC(std::string args)
69{

Callers

nothing calls this directly

Calls 4

RPCIsInWarmupFunction · 0.85
SetRPCWarmupFinishedFunction · 0.85
appendCommandMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected