mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-20 17:54:31 +00:00
bin: GetOuts
This commit is contained in:
parent
e60afa53fb
commit
a694ac5667
2 changed files with 51 additions and 3 deletions
|
@ -13,8 +13,8 @@ use crate::{
|
|||
macros::define_request_and_response,
|
||||
misc::{
|
||||
AuxPow, BlockCompleteEntry, BlockHeader, BlockOutputIndices, ChainInfo, ConnectionInfo,
|
||||
GetBan, HardforkEntry, HistogramEntry, OutputDistributionData, Peer, PoolTxInfo, SetBan,
|
||||
Span, Status, TxBacklogEntry,
|
||||
GetBan, GetOutputsOut, HardforkEntry, HistogramEntry, OutKey, OutputDistributionData, Peer,
|
||||
PoolTxInfo, SetBan, Span, Status, TxBacklogEntry,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -86,13 +86,28 @@ define_request_and_response! {
|
|||
core_rpc_server_commands_defs.h => 487..=510,
|
||||
GetOutputIndexes,
|
||||
Request {
|
||||
txid: Vec<[u8; 32]>,
|
||||
txid: [u8; 32],
|
||||
},
|
||||
AccessResponseBase {
|
||||
o_indexes: Vec<u64>,
|
||||
}
|
||||
}
|
||||
|
||||
define_request_and_response! {
|
||||
get_outsbin,
|
||||
cc73fe71162d564ffda8e549b79a350bca53c454 =>
|
||||
core_rpc_server_commands_defs.h => 512..=565,
|
||||
GetOuts,
|
||||
Request {
|
||||
outputs: Vec<GetOutputsOut>,
|
||||
#[cfg_attr(feature = "serde", serde(default = "default_bool"))]
|
||||
get_txid: bool = default_bool(),
|
||||
},
|
||||
AccessResponseBase {
|
||||
outs: Vec<OutKey>,
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------- Tests
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
|
|
@ -397,6 +397,39 @@ define_struct_and_impl_epee! {
|
|||
}
|
||||
}
|
||||
|
||||
define_struct_and_impl_epee! {
|
||||
#[doc = monero_definition_link!(
|
||||
cc73fe71162d564ffda8e549b79a350bca53c454,
|
||||
"rpc/core_rpc_server_commands_defs.h",
|
||||
512..=521
|
||||
)]
|
||||
/// Used in [`crate::bin::GetOutsRequest`].
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
GetOutputsOut {
|
||||
amount: u64,
|
||||
index: u64,
|
||||
}
|
||||
}
|
||||
|
||||
define_struct_and_impl_epee! {
|
||||
#[doc = monero_definition_link!(
|
||||
cc73fe71162d564ffda8e549b79a350bca53c454,
|
||||
"rpc/core_rpc_server_commands_defs.h",
|
||||
512..=521
|
||||
)]
|
||||
/// Used in [`crate::bin::GetOutsRequest`].
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
OutKey {
|
||||
key: u8, // TODO: crypto::public_key,
|
||||
mask: u8, // TODO: rct::key,
|
||||
unlocked: bool,
|
||||
height: u64,
|
||||
txid: [u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------- TODO
|
||||
// TODO - weird types.
|
||||
|
||||
|
|
Loading…
Reference in a new issue