Activate various RPC endpoints

These all appear to be converted, but weren't moved into the active
endpoint type list.

Includes a rename of SETBANS/GETBANS to SET_BANS/GET_BANS
This commit is contained in:
Jason Rhinelander 2022-12-16 16:08:36 -04:00
parent 47107e6e37
commit 2c7a4ab841
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
3 changed files with 18 additions and 19 deletions

View File

@ -1571,7 +1571,7 @@ namespace cryptonote::rpc {
hfinfo.response["status"] = STATUS_OK;
}
//------------------------------------------------------------------------------------------------------------------------------
void core_rpc_server::invoke(GETBANS& get_bans, rpc_context context)
void core_rpc_server::invoke(GET_BANS& get_bans, rpc_context context)
{
auto now = time(nullptr);
std::map<std::string, time_t> blocked_hosts = m_p2p.get_blocked_hosts();
@ -1626,7 +1626,7 @@ namespace cryptonote::rpc {
banned.response["status"] = STATUS_OK;
}
//------------------------------------------------------------------------------------------------------------------------------
void core_rpc_server::invoke(SETBANS& set_bans, rpc_context context)
void core_rpc_server::invoke(SET_BANS& set_bans, rpc_context context)
{
epee::net_utils::network_address na;
// try subnet first

View File

@ -166,8 +166,8 @@ namespace cryptonote::rpc {
void invoke(FLUSH_CACHE& flush_cache, rpc_context context);
void invoke(GET_LAST_BLOCK_HEADER& get_last_block_header, rpc_context context);
void invoke(GET_BLOCK_HEADER_BY_HASH& get_block_header_by_hash, rpc_context context);
void invoke(GETBANS& get_bans, rpc_context context);
void invoke(SETBANS& set_bans, rpc_context context);
void invoke(GET_BANS& get_bans, rpc_context context);
void invoke(SET_BANS& set_bans, rpc_context context);
void invoke(GET_CHECKPOINTS& get_checkpoints, rpc_context context);
void invoke(GET_STAKING_REQUIREMENT& get_staking_requirement, rpc_context context);
void invoke(GET_SERVICE_KEYS& get_service_keys, rpc_context context);

View File

@ -1284,7 +1284,6 @@ namespace cryptonote::rpc {
} request;
};
OXEN_RPC_DOC_INTROSPECT
/// Display alternative chains seen by the node.
///
/// Inputs: None
@ -2239,22 +2238,35 @@ namespace cryptonote::rpc {
FLUSH_CACHE,
FLUSH_TRANSACTION_POOL,
GET_ACCRUED_BATCHED_EARNINGS,
GET_ALTERNATE_CHAINS,
GET_BANS,
GET_BASE_FEE_ESTIMATE,
GET_BLOCK,
GET_BLOCK_COUNT,
GET_BLOCK_HASH,
GET_BLOCK_HEADERS_RANGE,
GET_BLOCK_HEADER_BY_HASH,
GET_BLOCK_HEADER_BY_HEIGHT,
GET_CHECKPOINTS,
GET_COINBASE_TX_SUM,
GET_CONNECTIONS,
GET_HEIGHT,
GET_INFO,
GET_LAST_BLOCK_HEADER,
GET_LIMIT,
GET_NET_STATS,
GET_OUTPUTS,
GET_OUTPUT_HISTOGRAM,
GET_PEER_LIST,
GET_QUORUM_STATE,
GET_SERVICE_KEYS,
GET_SERVICE_NODES,
GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES,
GET_SERVICE_NODE_REGISTRATION_CMD_RAW,
GET_SERVICE_NODE_STATUS,
GET_SERVICE_PRIVKEYS,
GET_SN_STATE_CHANGES,
GET_STAKING_REQUIREMENT,
GET_TRANSACTIONS,
GET_TRANSACTION_POOL_HASHES,
GET_TRANSACTION_POOL_STATS,
@ -2271,6 +2283,7 @@ namespace cryptonote::rpc {
PRUNE_BLOCKCHAIN,
REPORT_PEER_STATUS,
SAVE_BC,
SET_BANS,
SET_LIMIT,
SET_LOG_CATEGORIES,
SET_LOG_LEVEL,
@ -2285,23 +2298,9 @@ namespace cryptonote::rpc {
>;
using FIXME_old_rpc_types = tools::type_list<
GET_NET_STATS,
GET_LAST_BLOCK_HEADER,
GET_BLOCK_HEADER_BY_HASH,
GET_BLOCK_HEADER_BY_HEIGHT,
GET_BLOCK,
GET_BLOCK_HEADERS_RANGE,
GETBANS,
SETBANS,
GET_OUTPUT_HISTOGRAM,
GET_ALTERNATE_CHAINS,
RELAY_TX,
GET_OUTPUT_DISTRIBUTION,
GET_QUORUM_STATE,
GET_SERVICE_NODE_REGISTRATION_CMD_RAW,
GET_SERVICE_NODE_REGISTRATION_CMD,
GET_STAKING_REQUIREMENT,
GET_CHECKPOINTS,
ONS_NAMES_TO_OWNERS
>;