other: add UNDOCUMENTED_ENDPOINTs

This commit is contained in:
hinto.janai 2024-07-08 15:25:34 -04:00
parent 04ecd4f72d
commit 8bc3fe522e
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 52 additions and 2 deletions

View file

@ -432,7 +432,10 @@ define_struct_and_impl_epee! {
"rpc/core_rpc_server_commands_defs.h",
1398..=1417
)]
/// Used in [`crate::other::GetPeerListResponse`].
///
/// Used in:
/// - [`crate::other::GetPeerListResponse`]
/// - [`crate::other::GetPublicNodesResponse`]
PublicNode {
host: String,
last_seen: u64,

View file

@ -8,7 +8,10 @@ use crate::{
base::{AccessResponseBase, ResponseBase},
defaults::{default_bool, default_bool_true, default_string},
macros::define_request_and_response,
misc::{GetOutputsOut, OutKey, Peer, SpentKeyImageInfo, Status, TxEntry, TxInfo, TxpoolStats},
misc::{
GetOutputsOut, OutKey, Peer, PublicNode, SpentKeyImageInfo, Status, TxEntry, TxInfo,
TxpoolStats,
},
};
//---------------------------------------------------------------------------------------------------- TODO
@ -369,6 +372,50 @@ define_request_and_response! {
}
}
define_request_and_response! {
UNDOCUMENTED_ENDPOINT,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 2798..=2823,
GetTxIdsLoose,
Request {
txid_template: String,
num_matching_bits: u32,
},
ResponseBase {
txids: Vec<String>,
}
}
define_request_and_response! {
UNDOCUMENTED_ENDPOINT,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1615..=1635,
GetTransactionPoolHashes,
Request {},
ResponseBase {
tx_hashes: Vec<String>,
}
}
define_request_and_response! {
UNDOCUMENTED_ENDPOINT,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1419..=1448,
GetPublicNodes,
Request {
#[cfg_attr(feature = "serde", serde(default = "default_bool"))]
gray: bool = default_bool(),
#[cfg_attr(feature = "serde", serde(default = "default_bool_true"))]
white: bool = default_bool_true(),
#[cfg_attr(feature = "serde", serde(default = "default_bool"))]
include_blocked: bool = default_bool(),
},
ResponseBase {
gray: Vec<PublicNode>,
white: Vec<PublicNode>,
}
}
//---------------------------------------------------------------------------------------------------- Tests
#[cfg(test)]
mod test {