other: GetLimit, SetLimit, OutPeers, InPeers

This commit is contained in:
hinto.janai 2024-07-08 14:25:14 -04:00
parent fd9cde1e51
commit 9c27ff8311
No known key found for this signature in database
GPG key ID: D47CE05FA175A499

View file

@ -265,6 +265,63 @@ define_request_and_response! {
} }
} }
define_request_and_response! {
get_limit,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1852..=1874,
GetLimit,
Request {},
ResponseBase {
limit_down: u64,
limit_up: u64,
}
}
define_request_and_response! {
set_limit,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1876..=1903,
SetLimit,
Request {
limit_down: i64,
limit_up: i64,
},
ResponseBase {
limit_down: i64,
limit_up: i64,
}
}
define_request_and_response! {
out_peers,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1876..=1903,
OutPeers,
Request {
#[cfg_attr(feature = "serde", serde(default = "default_bool_true"))]
set: bool = default_bool_true(),
out_peers: u32,
},
ResponseBase {
out_peers: u32,
}
}
define_request_and_response! {
in_peers,
cc73fe71162d564ffda8e549b79a350bca53c454 =>
core_rpc_server_commands_defs.h => 1932..=1956,
InPeers,
Request {
#[cfg_attr(feature = "serde", serde(default = "default_bool_true"))]
set: bool = default_bool_true(),
in_peers: u32,
},
ResponseBase {
in_peers: u32,
}
}
//---------------------------------------------------------------------------------------------------- Tests //---------------------------------------------------------------------------------------------------- Tests
#[cfg(test)] #[cfg(test)]
mod test { mod test {