From 416e2c4928b4ce4488620d35757aa840bfd8013d Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Sun, 7 Jul 2024 20:37:36 -0400 Subject: [PATCH] bin: `GetTransactionPoolHashes` --- rpc/types/src/bin.rs | 11 +++++++++++ rpc/types/src/misc.rs | 18 +++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/rpc/types/src/bin.rs b/rpc/types/src/bin.rs index 49c84f9..ef40c15 100644 --- a/rpc/types/src/bin.rs +++ b/rpc/types/src/bin.rs @@ -109,6 +109,17 @@ define_request_and_response! { } } +define_request_and_response! { + get_transaction_pool_hashesbin, + cc73fe71162d564ffda8e549b79a350bca53c454 => + core_rpc_server_commands_defs.h => 1593..=1613, + GetTransactionPoolHashes, + Request {}, + AccessResponseBase { + tx_hashes: Vec<[u8; 32]>, + } +} + //---------------------------------------------------------------------------------------------------- Tests #[cfg(test)] mod test { diff --git a/rpc/types/src/misc.rs b/rpc/types/src/misc.rs index 75f9fe4..1dfde53 100644 --- a/rpc/types/src/misc.rs +++ b/rpc/types/src/misc.rs @@ -446,23 +446,23 @@ define_struct_and_impl_epee! { )] /// Used in [`crate::other::GetTransactionPoolResponse`]. TxInfo { - id_hash: String, - tx_json: String, blob_size: u64, - #[cfg_attr(feature = "serde", serde(default = "default_u64"))] - weight: u64 = default_u64(), + do_not_relay: bool, + double_spend_seen: bool, fee: u64, - max_used_block_id_hash: String, - max_used_block_height: u64, + id_hash: String, kept_by_block: bool, last_failed_height: u64, last_failed_id_hash: String, + last_relayed_time: u64, + max_used_block_height: u64, + max_used_block_id_hash: String, receive_time: u64, relayed: bool, - last_relayed_time: u64, - do_not_relay: bool, - double_spend_seen: bool, tx_blob: String, + tx_json: String, // TODO: this should be another struct + #[cfg_attr(feature = "serde", serde(default = "default_u64"))] + weight: u64 = default_u64(), } }