mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-10 06:39:15 +02:00
remove CRPCCommand constructor that takes rpcfn_type function pointer
This commit is contained in:
@@ -85,7 +85,6 @@ void RPCUnsetTimerInterface(RPCTimerInterface *iface);
|
||||
*/
|
||||
void RPCRunLater(const std::string& name, std::function<void()> func, int64_t nSeconds);
|
||||
|
||||
typedef UniValue(*rpcfn_type)(const JSONRPCRequest& jsonRequest);
|
||||
typedef RPCHelpMan (*RpcMethodFnType)();
|
||||
|
||||
class CRPCCommand
|
||||
@@ -116,14 +115,6 @@ public:
|
||||
CHECK_NONFATAL(fn().GetArgNames() == args_in);
|
||||
}
|
||||
|
||||
//! Simplified constructor taking plain rpcfn_type function pointer.
|
||||
CRPCCommand(const char* category, const char* name, rpcfn_type fn, std::initializer_list<const char*> args)
|
||||
: CRPCCommand(category, name,
|
||||
[fn](const JSONRPCRequest& request, UniValue& result, bool) { result = fn(request); return true; },
|
||||
{args.begin(), args.end()}, intptr_t(fn))
|
||||
{
|
||||
}
|
||||
|
||||
std::string category;
|
||||
std::string name;
|
||||
Actor actor;
|
||||
|
||||
Reference in New Issue
Block a user