mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-25 08:21:24 +02:00
Add RegisterMempoolRPCCommands helper
This commit is contained in:
parent
fafd40b541
commit
fad4c8934c
@ -2378,13 +2378,6 @@ UniValue CreateUTXOSnapshot(
|
||||
}
|
||||
|
||||
|
||||
RPCHelpMan getmempoolancestors();
|
||||
RPCHelpMan getmempooldescendants();
|
||||
RPCHelpMan getmempoolentry();
|
||||
RPCHelpMan getmempoolinfo();
|
||||
RPCHelpMan getrawmempool();
|
||||
RPCHelpMan savemempool();
|
||||
|
||||
void RegisterBlockchainRPCCommands(CRPCTable &t)
|
||||
{
|
||||
// clang-format off
|
||||
@ -2403,15 +2396,9 @@ static const CRPCCommand commands[] =
|
||||
{ "blockchain", &getchaintips, },
|
||||
{ "blockchain", &getdifficulty, },
|
||||
{ "blockchain", &getdeploymentinfo, },
|
||||
{ "blockchain", &getmempoolancestors, },
|
||||
{ "blockchain", &getmempooldescendants, },
|
||||
{ "blockchain", &getmempoolentry, },
|
||||
{ "blockchain", &getmempoolinfo, },
|
||||
{ "blockchain", &getrawmempool, },
|
||||
{ "blockchain", &gettxout, },
|
||||
{ "blockchain", &gettxoutsetinfo, },
|
||||
{ "blockchain", &pruneblockchain, },
|
||||
{ "blockchain", &savemempool, },
|
||||
{ "blockchain", &verifychain, },
|
||||
|
||||
{ "blockchain", &preciousblock, },
|
||||
|
@ -457,3 +457,20 @@ RPCHelpMan savemempool()
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
void RegisterMempoolRPCCommands(CRPCTable& t)
|
||||
{
|
||||
static const CRPCCommand commands[]{
|
||||
// category actor (function)
|
||||
// -------- ----------------
|
||||
{"blockchain", &getmempoolancestors},
|
||||
{"blockchain", &getmempooldescendants},
|
||||
{"blockchain", &getmempoolentry},
|
||||
{"blockchain", &getmempoolinfo},
|
||||
{"blockchain", &getrawmempool},
|
||||
{"blockchain", &savemempool},
|
||||
};
|
||||
for (const auto& c : commands) {
|
||||
t.appendCommand(c.name, &c);
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ class CRPCTable;
|
||||
|
||||
/** Register block chain RPC commands */
|
||||
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC);
|
||||
/** Register mempool RPC commands */
|
||||
void RegisterMempoolRPCCommands(CRPCTable&);
|
||||
/** Register P2P networking RPC commands */
|
||||
void RegisterNetRPCCommands(CRPCTable &tableRPC);
|
||||
/** Register miscellaneous RPC commands */
|
||||
@ -25,6 +27,7 @@ void RegisterSignerRPCCommands(CRPCTable &tableRPC);
|
||||
static inline void RegisterAllCoreRPCCommands(CRPCTable &t)
|
||||
{
|
||||
RegisterBlockchainRPCCommands(t);
|
||||
RegisterMempoolRPCCommands(t);
|
||||
RegisterNetRPCCommands(t);
|
||||
RegisterMiscRPCCommands(t);
|
||||
RegisterMiningRPCCommands(t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user