mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-11-16 15:58:14 +00:00
other: GetTransactionPoolStats
This commit is contained in:
parent
416e2c4928
commit
06265877cf
2 changed files with 50 additions and 1 deletions
|
@ -479,6 +479,44 @@ define_struct_and_impl_epee! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define_struct_and_impl_epee! {
|
||||||
|
#[doc = monero_definition_link!(
|
||||||
|
cc73fe71162d564ffda8e549b79a350bca53c454,
|
||||||
|
"rpc/core_rpc_server_commands_defs.h",
|
||||||
|
1666..=1675
|
||||||
|
)]
|
||||||
|
#[derive(Copy)]
|
||||||
|
/// Used in [`crate::other::GetTransactionPoolStatsResponse`].
|
||||||
|
TxpoolHisto {
|
||||||
|
txs: u32,
|
||||||
|
bytes: u64,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
define_struct_and_impl_epee! {
|
||||||
|
#[doc = monero_definition_link!(
|
||||||
|
cc73fe71162d564ffda8e549b79a350bca53c454,
|
||||||
|
"rpc/core_rpc_server_commands_defs.h",
|
||||||
|
1677..=1710
|
||||||
|
)]
|
||||||
|
/// Used in [`crate::other::GetTransactionPoolStatsResponse`].
|
||||||
|
TxpoolStats {
|
||||||
|
bytes_max: u32,
|
||||||
|
bytes_med: u32,
|
||||||
|
bytes_min: u32,
|
||||||
|
bytes_total: u64,
|
||||||
|
fee_total: u64,
|
||||||
|
histo_98pc: u64,
|
||||||
|
histo: Vec<TxpoolHisto>,
|
||||||
|
num_10m: u32,
|
||||||
|
num_double_spends: u32,
|
||||||
|
num_failing: u32,
|
||||||
|
num_not_relayed: u32,
|
||||||
|
oldest: u64,
|
||||||
|
txs_total: u32,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- TODO
|
//---------------------------------------------------------------------------------------------------- TODO
|
||||||
// TODO - weird types.
|
// TODO - weird types.
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use crate::{
|
||||||
base::{AccessResponseBase, ResponseBase},
|
base::{AccessResponseBase, ResponseBase},
|
||||||
defaults::{default_bool, default_bool_true, default_string},
|
defaults::{default_bool, default_bool_true, default_string},
|
||||||
macros::define_request_and_response,
|
macros::define_request_and_response,
|
||||||
misc::{Peer, SpentKeyImageInfo, Status, TxEntry, TxInfo},
|
misc::{Peer, SpentKeyImageInfo, Status, TxEntry, TxInfo, TxpoolStats},
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- TODO
|
//---------------------------------------------------------------------------------------------------- TODO
|
||||||
|
@ -243,6 +243,17 @@ define_request_and_response! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define_request_and_response! {
|
||||||
|
get_transaction_pool_stats,
|
||||||
|
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
||||||
|
core_rpc_server_commands_defs.h => 1712..=1732,
|
||||||
|
GetTransactionPoolStats,
|
||||||
|
Request {},
|
||||||
|
AccessResponseBase {
|
||||||
|
pool_stats: TxpoolStats,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- Tests
|
//---------------------------------------------------------------------------------------------------- Tests
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
|
Loading…
Reference in a new issue