Add RegisterMempoolRPCCommands helper

This commit is contained in:
MarcoFalke
2022-03-15 19:31:10 +01:00
parent fafd40b541
commit fad4c8934c
3 changed files with 20 additions and 13 deletions

View File

@@ -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);
}
}