mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-26 17:02:00 +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)
|
void RegisterBlockchainRPCCommands(CRPCTable &t)
|
||||||
{
|
{
|
||||||
// clang-format off
|
// clang-format off
|
||||||
@ -2403,15 +2396,9 @@ static const CRPCCommand commands[] =
|
|||||||
{ "blockchain", &getchaintips, },
|
{ "blockchain", &getchaintips, },
|
||||||
{ "blockchain", &getdifficulty, },
|
{ "blockchain", &getdifficulty, },
|
||||||
{ "blockchain", &getdeploymentinfo, },
|
{ "blockchain", &getdeploymentinfo, },
|
||||||
{ "blockchain", &getmempoolancestors, },
|
|
||||||
{ "blockchain", &getmempooldescendants, },
|
|
||||||
{ "blockchain", &getmempoolentry, },
|
|
||||||
{ "blockchain", &getmempoolinfo, },
|
|
||||||
{ "blockchain", &getrawmempool, },
|
|
||||||
{ "blockchain", &gettxout, },
|
{ "blockchain", &gettxout, },
|
||||||
{ "blockchain", &gettxoutsetinfo, },
|
{ "blockchain", &gettxoutsetinfo, },
|
||||||
{ "blockchain", &pruneblockchain, },
|
{ "blockchain", &pruneblockchain, },
|
||||||
{ "blockchain", &savemempool, },
|
|
||||||
{ "blockchain", &verifychain, },
|
{ "blockchain", &verifychain, },
|
||||||
|
|
||||||
{ "blockchain", &preciousblock, },
|
{ "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 */
|
/** Register block chain RPC commands */
|
||||||
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC);
|
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC);
|
||||||
|
/** Register mempool RPC commands */
|
||||||
|
void RegisterMempoolRPCCommands(CRPCTable&);
|
||||||
/** Register P2P networking RPC commands */
|
/** Register P2P networking RPC commands */
|
||||||
void RegisterNetRPCCommands(CRPCTable &tableRPC);
|
void RegisterNetRPCCommands(CRPCTable &tableRPC);
|
||||||
/** Register miscellaneous RPC commands */
|
/** Register miscellaneous RPC commands */
|
||||||
@ -25,6 +27,7 @@ void RegisterSignerRPCCommands(CRPCTable &tableRPC);
|
|||||||
static inline void RegisterAllCoreRPCCommands(CRPCTable &t)
|
static inline void RegisterAllCoreRPCCommands(CRPCTable &t)
|
||||||
{
|
{
|
||||||
RegisterBlockchainRPCCommands(t);
|
RegisterBlockchainRPCCommands(t);
|
||||||
|
RegisterMempoolRPCCommands(t);
|
||||||
RegisterNetRPCCommands(t);
|
RegisterNetRPCCommands(t);
|
||||||
RegisterMiscRPCCommands(t);
|
RegisterMiscRPCCommands(t);
|
||||||
RegisterMiningRPCCommands(t);
|
RegisterMiningRPCCommands(t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user