mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-22 19:49:33 +00:00
fix type defaults, use Hex
This commit is contained in:
parent
89191ce3bc
commit
3a799219b8
8 changed files with 188 additions and 144 deletions
|
@ -24,7 +24,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(any(feature = "epee", feature = "serde"))]
|
#[cfg(any(feature = "epee", feature = "serde"))]
|
||||||
use crate::defaults::{default_false, default_zero};
|
use crate::defaults::default;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- Definitions
|
//---------------------------------------------------------------------------------------------------- Definitions
|
||||||
define_request_and_response! {
|
define_request_and_response! {
|
||||||
|
@ -36,7 +36,7 @@ define_request_and_response! {
|
||||||
heights: Vec<u64>,
|
heights: Vec<u64>,
|
||||||
},
|
},
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
blocks: Vec<BlockCompleteEntry>,
|
blocks: Vec<BlockCompleteEntry> = default::<Vec<BlockCompleteEntry>>(), "default",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ define_request_and_response! {
|
||||||
core_rpc_server_commands_defs.h => 309..=338,
|
core_rpc_server_commands_defs.h => 309..=338,
|
||||||
GetHashes,
|
GetHashes,
|
||||||
Request {
|
Request {
|
||||||
block_ids: ByteArrayVec<32>,
|
block_ids: ByteArrayVec<32> = default::<ByteArrayVec<32>>(), "default",
|
||||||
start_height: u64,
|
start_height: u64,
|
||||||
},
|
},
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
m_blocks_ids: ByteArrayVec<32>,
|
m_blocks_ids: ByteArrayVec<32> = default::<ByteArrayVec<32>>(), "default",
|
||||||
start_height: u64,
|
start_height: u64,
|
||||||
current_height: u64,
|
current_height: u64,
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ define_request_and_response! {
|
||||||
txid: [u8; 32],
|
txid: [u8; 32],
|
||||||
},
|
},
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
o_indexes: Vec<u64>,
|
o_indexes: Vec<u64> = default::<Vec<u64>>(), "default",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,11 +92,11 @@ define_request_and_response! {
|
||||||
core_rpc_server_commands_defs.h => 512..=565,
|
core_rpc_server_commands_defs.h => 512..=565,
|
||||||
GetOuts,
|
GetOuts,
|
||||||
Request {
|
Request {
|
||||||
outputs: Vec<GetOutputsOut>,
|
outputs: Vec<GetOutputsOut> = default::<Vec<GetOutputsOut>>(), "default",
|
||||||
get_txid: bool = default_false(), "default_false",
|
get_txid: bool,
|
||||||
},
|
},
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
outs: Vec<OutKeyBin>,
|
outs: Vec<OutKeyBin> = default::<Vec<OutKeyBin>>(), "default",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ define_request_and_response! {
|
||||||
GetTransactionPoolHashes,
|
GetTransactionPoolHashes,
|
||||||
Request {},
|
Request {},
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
tx_hashes: ByteArrayVec<32>,
|
tx_hashes: ByteArrayVec<32> = default::<ByteArrayVec<32>>(), "default",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,22 +119,22 @@ define_request_and_response! {
|
||||||
GetBlocks,
|
GetBlocks,
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
requested_info: u8 = default_zero::<u8>(), "default_zero",
|
requested_info: u8 = default::<u8>(), "default",
|
||||||
// FIXME: This is a `std::list` in `monerod` because...?
|
// FIXME: This is a `std::list` in `monerod` because...?
|
||||||
block_ids: ByteArrayVec<32>,
|
block_ids: ByteArrayVec<32> = default::<ByteArrayVec<32>>(), "default",
|
||||||
start_height: u64,
|
start_height: u64,
|
||||||
prune: bool,
|
prune: bool,
|
||||||
no_miner_tx: bool = default_false(), "default_false",
|
no_miner_tx: bool,
|
||||||
pool_info_since: u64 = default_zero::<u64>(), "default_zero",
|
pool_info_since: u64 = default::<u64>(), "default",
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: add `top_block_hash` field
|
// TODO: add `top_block_hash` field
|
||||||
// <https://github.com/monero-project/monero/blame/893916ad091a92e765ce3241b94e706ad012b62a/src/rpc/core_rpc_server_commands_defs.h#L263>
|
// <https://github.com/monero-project/monero/blame/893916ad091a92e765ce3241b94e706ad012b62a/src/rpc/core_rpc_server_commands_defs.h#L263>
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
blocks: Vec<BlockCompleteEntry>,
|
blocks: Vec<BlockCompleteEntry> = default::<Vec<BlockCompleteEntry>>(), "default",
|
||||||
start_height: u64,
|
start_height: u64,
|
||||||
current_height: u64,
|
current_height: u64,
|
||||||
output_indices: Vec<BlockOutputIndices>,
|
output_indices: Vec<BlockOutputIndices> = default::<Vec<BlockOutputIndices>>(), "default",
|
||||||
daemon_time: u64,
|
daemon_time: u64,
|
||||||
pool_info: PoolInfo,
|
pool_info: PoolInfo,
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,36 +10,12 @@
|
||||||
//---------------------------------------------------------------------------------------------------- Import
|
//---------------------------------------------------------------------------------------------------- Import
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- TODO
|
//---------------------------------------------------------------------------------------------------- TODO
|
||||||
/// Default [`bool`] type used in request/response types, `false`.
|
|
||||||
#[inline]
|
|
||||||
pub(crate) const fn default_false() -> bool {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Default [`bool`] type used in _some_ request/response types, `true`.
|
/// Default [`bool`] type used in _some_ request/response types, `true`.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) const fn default_true() -> bool {
|
pub(crate) const fn default_true() -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Default [`String`] type used in request/response types.
|
|
||||||
#[inline]
|
|
||||||
pub(crate) const fn default_string() -> String {
|
|
||||||
String::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Default block height used in request/response types.
|
|
||||||
#[inline]
|
|
||||||
pub(crate) const fn default_height() -> u64 {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Default [`Vec`] used in request/response types.
|
|
||||||
#[inline]
|
|
||||||
pub(crate) const fn default_vec<T>() -> Vec<T> {
|
|
||||||
Vec::new()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Default `0` value used in request/response types.
|
/// Default `0` value used in request/response types.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) fn default_zero<T: From<u8>>() -> T {
|
pub(crate) fn default_zero<T: From<u8>>() -> T {
|
||||||
|
@ -52,6 +28,12 @@ pub(crate) fn default_one<T: From<u8>>() -> T {
|
||||||
T::from(1)
|
T::from(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Generate a default `T` to be used in request/response types.
|
||||||
|
#[inline]
|
||||||
|
pub(crate) fn default<T: Default>() -> T {
|
||||||
|
T::default()
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- Tests
|
//---------------------------------------------------------------------------------------------------- Tests
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
|
|
@ -20,10 +20,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(any(feature = "epee", feature = "serde"))]
|
#[cfg(any(feature = "epee", feature = "serde"))]
|
||||||
use crate::defaults::{
|
use crate::defaults::{default, default_one, default_true};
|
||||||
default_false, default_height, default_one, default_string, default_true, default_vec,
|
|
||||||
default_zero,
|
|
||||||
};
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- Definitions
|
//---------------------------------------------------------------------------------------------------- Definitions
|
||||||
// This generates 2 structs:
|
// This generates 2 structs:
|
||||||
|
@ -81,15 +78,15 @@ define_request_and_response! {
|
||||||
//
|
//
|
||||||
// This is a HACK since `serde`'s default attribute only takes in
|
// This is a HACK since `serde`'s default attribute only takes in
|
||||||
// string literals and macros (stringify) within attributes do not work.
|
// string literals and macros (stringify) within attributes do not work.
|
||||||
extra_nonce: String = default_string(), "default_string",
|
extra_nonce: String,
|
||||||
prev_block: String = default_string(), "default_string",
|
prev_block: String,
|
||||||
|
|
||||||
// Another optional expression:
|
// Another optional expression:
|
||||||
// This indicates to the macro to (de)serialize
|
// This indicates to the macro to (de)serialize
|
||||||
// this field as another type in epee.
|
// this field as another type in epee.
|
||||||
//
|
//
|
||||||
// See `cuprate_epee_encoding::epee_object` for info.
|
// See `cuprate_epee_encoding::epee_object` for info.
|
||||||
reserve_size: u64 = default_zero::<u64>(), "default_zero" /* as Type */,
|
reserve_size: u64,
|
||||||
|
|
||||||
wallet_address: String,
|
wallet_address: String,
|
||||||
},
|
},
|
||||||
|
@ -125,7 +122,7 @@ define_request_and_response! {
|
||||||
difficulty: u64,
|
difficulty: u64,
|
||||||
expected_reward: u64,
|
expected_reward: u64,
|
||||||
height: u64,
|
height: u64,
|
||||||
next_seed_hash: String = default_string(), "default_string",
|
next_seed_hash: String,
|
||||||
prev_hash: Hex<32>,
|
prev_hash: Hex<32>,
|
||||||
reserved_offset: u64,
|
reserved_offset: u64,
|
||||||
seed_hash: Hex<32>,
|
seed_hash: Hex<32>,
|
||||||
|
@ -200,7 +197,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
amount_of_blocks: u64,
|
amount_of_blocks: u64,
|
||||||
prev_block: String = default_string(), "default_string",
|
prev_block: String,
|
||||||
starting_nonce: u32,
|
starting_nonce: u32,
|
||||||
wallet_address: String,
|
wallet_address: String,
|
||||||
},
|
},
|
||||||
|
@ -220,7 +217,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
Request {
|
Request {
|
||||||
fill_pow_hash: bool = default_false(), "default_false",
|
fill_pow_hash: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -236,13 +233,13 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
hash: Hex<32>,
|
hash: Hex<32>,
|
||||||
hashes: Vec<Hex<32>> = default_vec::<Hex<32>>(), "default_vec",
|
hashes: Vec<Hex<32>>,
|
||||||
fill_pow_hash: bool = default_false(), "default_false",
|
fill_pow_hash: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
block_header: BlockHeader,
|
block_header: BlockHeader,
|
||||||
block_headers: Vec<BlockHeader> = default_vec::<BlockHeader>(), "default_vec",
|
block_headers: Vec<BlockHeader>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +253,7 @@ define_request_and_response! {
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
Request {
|
Request {
|
||||||
height: u64,
|
height: u64,
|
||||||
fill_pow_hash: bool = default_false(), "default_false",
|
fill_pow_hash: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -275,7 +272,7 @@ define_request_and_response! {
|
||||||
Request {
|
Request {
|
||||||
start_height: u64,
|
start_height: u64,
|
||||||
end_height: u64,
|
end_height: u64,
|
||||||
fill_pow_hash: bool = default_false(), "default_false",
|
fill_pow_hash: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -293,9 +290,9 @@ define_request_and_response! {
|
||||||
// `monerod` has both `hash` and `height` fields.
|
// `monerod` has both `hash` and `height` fields.
|
||||||
// In the RPC handler, if `hash.is_empty()`, it will use it, else, it uses `height`.
|
// In the RPC handler, if `hash.is_empty()`, it will use it, else, it uses `height`.
|
||||||
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L2674>
|
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L2674>
|
||||||
hash: String = default_string(), "default_string",
|
hash: String,
|
||||||
height: u64 = default_height(), "default_height",
|
height: u64,
|
||||||
fill_pow_hash: bool = default_false(), "default_false",
|
fill_pow_hash: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -305,7 +302,7 @@ define_request_and_response! {
|
||||||
/// to create this JSON string in a type-safe manner.
|
/// to create this JSON string in a type-safe manner.
|
||||||
json: String,
|
json: String,
|
||||||
miner_tx_hash: Hex<32>,
|
miner_tx_hash: Hex<32>,
|
||||||
tx_hashes: Vec<Hex<32>> = default_vec::<Hex<32>>(), "default_vec",
|
tx_hashes: Vec<Hex<32>>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,7 +316,6 @@ define_request_and_response! {
|
||||||
Request {},
|
Request {},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
// FIXME: This is a `std::list` in `monerod` because...?
|
|
||||||
connections: Vec<ConnectionInfo>,
|
connections: Vec<ConnectionInfo>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,7 +445,7 @@ define_request_and_response! {
|
||||||
FlushTransactionPool (restricted),
|
FlushTransactionPool (restricted),
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
txids: Vec<Hex<32>> = default_vec::<Hex<32>>(), "default_vec",
|
txids: Vec<Hex<32>>,
|
||||||
},
|
},
|
||||||
|
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
|
@ -466,10 +462,10 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
amounts: Vec<u64>,
|
amounts: Vec<u64>,
|
||||||
min_count: u64 = default_zero::<u64>(), "default_zero",
|
min_count: u64,
|
||||||
max_count: u64 = default_zero::<u64>(), "default_zero",
|
max_count: u64,
|
||||||
unlocked: bool = default_false(), "default_false",
|
unlocked: bool,
|
||||||
recent_cutoff: u64 = default_zero::<u64>(), "default_zero",
|
recent_cutoff: u64,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -510,9 +506,9 @@ define_request_and_response! {
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
version: u32,
|
version: u32,
|
||||||
release: bool,
|
release: bool,
|
||||||
current_height: u64 = default_zero::<u64>(), "default_zero",
|
current_height: u64,
|
||||||
target_height: u64 = default_zero::<u64>(), "default_zero",
|
target_height: u64,
|
||||||
hard_forks: Vec<HardForkEntry> = default_vec(), "default_vec",
|
hard_forks: Vec<HardForkEntry>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,7 +520,7 @@ define_request_and_response! {
|
||||||
GetFeeEstimate,
|
GetFeeEstimate,
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
grace_blocks: u64 = default_zero::<u64>(), "default_zero",
|
grace_blocks: u64,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -576,10 +572,8 @@ define_request_and_response! {
|
||||||
height: u64,
|
height: u64,
|
||||||
next_needed_pruning_seed: u32,
|
next_needed_pruning_seed: u32,
|
||||||
overview: String,
|
overview: String,
|
||||||
// FIXME: This is a `std::list` in `monerod` because...?
|
peers: Vec<SyncInfoPeer>,
|
||||||
peers: Vec<SyncInfoPeer> = default_vec::<SyncInfoPeer>(), "default_vec",
|
spans: Vec<Span>,
|
||||||
// FIXME: This is a `std::list` in `monerod` because...?
|
|
||||||
spans: Vec<Span> = default_vec::<Span>(), "default_vec",
|
|
||||||
target_height: u64,
|
target_height: u64,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -610,10 +604,10 @@ define_request_and_response! {
|
||||||
Request {
|
Request {
|
||||||
amounts: Vec<u64>,
|
amounts: Vec<u64>,
|
||||||
binary: bool = default_true(), "default_true",
|
binary: bool = default_true(), "default_true",
|
||||||
compress: bool = default_false(), "default_false",
|
compress: bool,
|
||||||
cumulative: bool = default_false(), "default_false",
|
cumulative: bool,
|
||||||
from_height: u64 = default_zero::<u64>(), "default_zero",
|
from_height: u64,
|
||||||
to_height: u64 = default_zero::<u64>(), "default_zero",
|
to_height: u64,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
|
@ -649,7 +643,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
Request {
|
Request {
|
||||||
check: bool = default_false(), "default_false",
|
check: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
|
@ -688,8 +682,8 @@ define_request_and_response! {
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
Request {
|
Request {
|
||||||
bad_txs: bool = default_false(), "default_false",
|
bad_txs: bool,
|
||||||
bad_blocks: bool = default_false(), "default_false",
|
bad_blocks: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {}
|
ResponseBase {}
|
||||||
|
|
|
@ -238,6 +238,7 @@ macro_rules! define_request {
|
||||||
) => {
|
) => {
|
||||||
#[allow(dead_code, missing_docs, reason = "inside a macro")]
|
#[allow(dead_code, missing_docs, reason = "inside a macro")]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
|
#[cfg_attr(feature = "serde", serde(default))] // TODO: link epee field not serializing oddity
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
$( #[$attr] )*
|
$( #[$attr] )*
|
||||||
pub struct $t {
|
pub struct $t {
|
||||||
|
|
|
@ -20,6 +20,7 @@ use cuprate_epee_encoding::{
|
||||||
/// Used in [`crate::other::IsKeyImageSpentResponse`].
|
/// Used in [`crate::other::IsKeyImageSpentResponse`].
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[cfg_attr(feature = "serde", serde(try_from = "u8", into = "u8"))]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum KeyImageSpentStatus {
|
pub enum KeyImageSpentStatus {
|
||||||
Unspent = 0,
|
Unspent = 0,
|
||||||
|
@ -68,6 +69,19 @@ impl KeyImageSpentStatus {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<KeyImageSpentStatus> for u8 {
|
||||||
|
fn from(value: KeyImageSpentStatus) -> Self {
|
||||||
|
value.to_u8()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TryFrom<u8> for KeyImageSpentStatus {
|
||||||
|
type Error = u8;
|
||||||
|
fn try_from(value: u8) -> Result<Self, Self::Error> {
|
||||||
|
Self::from_u8(value).ok_or(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "epee")]
|
#[cfg(feature = "epee")]
|
||||||
impl EpeeValue for KeyImageSpentStatus {
|
impl EpeeValue for KeyImageSpentStatus {
|
||||||
const MARKER: Marker = u8::MARKER;
|
const MARKER: Marker = u8::MARKER;
|
||||||
|
|
|
@ -20,6 +20,7 @@ use cuprate_epee_encoding::{
|
||||||
/// Used in [`crate::bin::GetBlocksRequest`].
|
/// Used in [`crate::bin::GetBlocksRequest`].
|
||||||
#[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[cfg_attr(feature = "serde", serde(try_from = "u8", into = "u8"))]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
pub enum RequestedInfo {
|
pub enum RequestedInfo {
|
||||||
#[default]
|
#[default]
|
||||||
|
@ -69,6 +70,19 @@ impl RequestedInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<RequestedInfo> for u8 {
|
||||||
|
fn from(value: RequestedInfo) -> Self {
|
||||||
|
value.to_u8()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TryFrom<u8> for RequestedInfo {
|
||||||
|
type Error = u8;
|
||||||
|
fn try_from(value: u8) -> Result<Self, Self::Error> {
|
||||||
|
Self::from_u8(value).ok_or(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "epee")]
|
#[cfg(feature = "epee")]
|
||||||
impl EpeeValue for RequestedInfo {
|
impl EpeeValue for RequestedInfo {
|
||||||
const MARKER: Marker = u8::MARKER;
|
const MARKER: Marker = u8::MARKER;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use cuprate_hex::Hex;
|
||||||
use cuprate_types::HardFork;
|
use cuprate_types::HardFork;
|
||||||
|
|
||||||
#[cfg(any(feature = "epee", feature = "serde"))]
|
#[cfg(any(feature = "epee", feature = "serde"))]
|
||||||
use crate::defaults::default_zero;
|
use crate::defaults::default;
|
||||||
|
|
||||||
use crate::macros::monero_definition_link;
|
use crate::macros::monero_definition_link;
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ macro_rules! define_struct_and_impl_epee {
|
||||||
$(
|
$(
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
|
#[cfg_attr(feature = "serde", serde(default))]
|
||||||
$( #[$struct_attr] )*
|
$( #[$struct_attr] )*
|
||||||
pub struct $struct_name {
|
pub struct $struct_name {
|
||||||
$(
|
$(
|
||||||
|
@ -148,9 +149,7 @@ define_struct_and_impl_epee! {
|
||||||
)]
|
)]
|
||||||
/// Used in [`crate::json::SetBansRequest`].
|
/// Used in [`crate::json::SetBansRequest`].
|
||||||
SetBan {
|
SetBan {
|
||||||
#[cfg_attr(feature = "serde", serde(default = "crate::defaults::default_string"))]
|
|
||||||
host: String,
|
host: String,
|
||||||
#[cfg_attr(feature = "serde", serde(default = "default_zero"))]
|
|
||||||
ip: u32,
|
ip: u32,
|
||||||
ban: bool,
|
ban: bool,
|
||||||
seconds: u32,
|
seconds: u32,
|
||||||
|
@ -293,8 +292,7 @@ define_struct_and_impl_epee! {
|
||||||
relayed: bool,
|
relayed: bool,
|
||||||
tx_blob: String,
|
tx_blob: String,
|
||||||
tx_json: cuprate_types::json::tx::Transaction,
|
tx_json: cuprate_types::json::tx::Transaction,
|
||||||
#[cfg_attr(feature = "serde", serde(default = "default_zero"))]
|
weight: u64 = default::<u64>(),
|
||||||
weight: u64 = default_zero::<u64>(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,18 @@
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use cuprate_hex::Hex;
|
||||||
use cuprate_types::rpc::{OutKey, Peer, PublicNode, TxpoolStats};
|
use cuprate_types::rpc::{OutKey, Peer, PublicNode, TxpoolStats};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
base::{AccessResponseBase, ResponseBase},
|
base::{AccessResponseBase, ResponseBase},
|
||||||
macros::define_request_and_response,
|
macros::define_request_and_response,
|
||||||
misc::{GetOutputsOut, SpentKeyImageInfo, Status, TxEntry, TxInfo},
|
misc::{GetOutputsOut, KeyImageSpentStatus, SpentKeyImageInfo, Status, TxEntry, TxInfo},
|
||||||
RpcCallValue,
|
RpcCallValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(any(feature = "serde", feature = "epee"))]
|
#[cfg(any(feature = "serde", feature = "epee"))]
|
||||||
use crate::defaults::{default_false, default_string, default_true, default_vec, default_zero};
|
use crate::defaults::default_true;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------- Definitions
|
//---------------------------------------------------------------------------------------------------- Definitions
|
||||||
define_request_and_response! {
|
define_request_and_response! {
|
||||||
|
@ -27,7 +28,7 @@ define_request_and_response! {
|
||||||
Request {},
|
Request {},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
hash: String,
|
hash: Hex<32>,
|
||||||
height: u64,
|
height: u64,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,22 +40,22 @@ define_request_and_response! {
|
||||||
GetTransactions,
|
GetTransactions,
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
txs_hashes: Vec<String> = default_vec::<String>(), "default_vec",
|
txs_hashes: Vec<Hex<32>>,
|
||||||
// FIXME: this is documented as optional but it isn't serialized as an optional
|
// FIXME: this is documented as optional but it isn't serialized as an optional
|
||||||
// but it is set _somewhere_ to false in `monerod`
|
// but it is set _somewhere_ to false in `monerod`
|
||||||
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server_commands_defs.h#L382>
|
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server_commands_defs.h#L382>
|
||||||
decode_as_json: bool = default_false(), "default_false",
|
decode_as_json: bool,
|
||||||
prune: bool = default_false(), "default_false",
|
prune: bool,
|
||||||
split: bool = default_false(), "default_false",
|
split: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
txs_as_hex: Vec<String> = default_vec::<String>(), "default_vec",
|
txs_as_hex: Vec<String>,
|
||||||
/// `cuprate_rpc_types::json::tx::Transaction` should be used
|
/// `cuprate_rpc_types::json::tx::Transaction` should be used
|
||||||
/// to create this JSON string in a type-safe manner.
|
/// to create this JSON string in a type-safe manner.
|
||||||
txs_as_json: Vec<String> = default_vec::<String>(), "default_vec",
|
txs_as_json: Vec<String>,
|
||||||
missed_tx: Vec<String> = default_vec::<String>(), "default_vec",
|
missed_tx: Vec<Hex<32>>,
|
||||||
txs: Vec<TxEntry> = default_vec::<TxEntry>(), "default_vec",
|
txs: Vec<TxEntry>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ define_request_and_response! {
|
||||||
Request {},
|
Request {},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
blks_hashes: Vec<String>,
|
blks_hashes: Vec<Hex<32>>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,12 +79,11 @@ define_request_and_response! {
|
||||||
IsKeyImageSpent,
|
IsKeyImageSpent,
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
key_images: Vec<String>,
|
key_images: Vec<Hex<32>>,
|
||||||
},
|
},
|
||||||
|
|
||||||
AccessResponseBase {
|
AccessResponseBase {
|
||||||
/// FIXME: These are [`KeyImageSpentStatus`](crate::misc::KeyImageSpentStatus) in [`u8`] form.
|
spent_status: Vec<KeyImageSpentStatus>,
|
||||||
spent_status: Vec<u8>,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
tx_as_hex: String,
|
tx_as_hex: String,
|
||||||
do_not_relay: bool = default_false(), "default_false",
|
do_not_relay: bool,
|
||||||
do_sanity_checks: bool = default_true(), "default_true",
|
do_sanity_checks: bool = default_true(), "default_true",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ define_request_and_response! {
|
||||||
invalid_input: bool,
|
invalid_input: bool,
|
||||||
invalid_output: bool,
|
invalid_output: bool,
|
||||||
low_mixin: bool,
|
low_mixin: bool,
|
||||||
nonzero_unlock_time: bool = default_false(), "default_false",
|
nonzero_unlock_time: bool,
|
||||||
not_relayed: bool,
|
not_relayed: bool,
|
||||||
overspend: bool,
|
overspend: bool,
|
||||||
reason: String,
|
reason: String,
|
||||||
|
@ -189,7 +189,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
public_only: bool = default_true(), "default_true",
|
public_only: bool = default_true(), "default_true",
|
||||||
include_blocked: bool = default_false(), "default_false",
|
include_blocked: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
|
@ -207,7 +207,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
#[derive(Copy)]
|
#[derive(Copy)]
|
||||||
Request {
|
Request {
|
||||||
visible: bool = default_false(), "default_false",
|
visible: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {}
|
ResponseBase {}
|
||||||
|
@ -236,7 +236,7 @@ define_request_and_response! {
|
||||||
SetLogCategories (restricted),
|
SetLogCategories (restricted),
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
categories: String = default_string(), "default_string",
|
categories: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
|
@ -253,9 +253,9 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
address: String,
|
address: String,
|
||||||
username: String = default_string(), "default_string",
|
username: String,
|
||||||
password: String = default_string(), "default_string",
|
password: String,
|
||||||
proxy: String = default_string(), "default_string",
|
proxy: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
Response {
|
Response {
|
||||||
|
@ -325,9 +325,8 @@ define_request_and_response! {
|
||||||
SetLimit (restricted),
|
SetLimit (restricted),
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
// FIXME: These may need to be `Option<i64>`.
|
limit_down: i64,
|
||||||
limit_down: i64 = default_zero::<i64>(), "default_zero",
|
limit_up: i64,
|
||||||
limit_up: i64 = default_zero::<i64>(), "default_zero",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
|
@ -409,7 +408,7 @@ define_request_and_response! {
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
command: String,
|
command: String,
|
||||||
path: String = default_string(), "default_string",
|
path: String,
|
||||||
},
|
},
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
auto_uri: String,
|
auto_uri: String,
|
||||||
|
@ -447,7 +446,7 @@ define_request_and_response! {
|
||||||
Request {},
|
Request {},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
tx_hashes: Vec<String>,
|
tx_hashes: Vec<Hex<32>>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,14 +458,14 @@ define_request_and_response! {
|
||||||
GetPublicNodes (restricted),
|
GetPublicNodes (restricted),
|
||||||
|
|
||||||
Request {
|
Request {
|
||||||
gray: bool = default_false(), "default_false",
|
gray: bool,
|
||||||
white: bool = default_true(), "default_true",
|
white: bool = default_true(), "default_true",
|
||||||
include_blocked: bool = default_false(), "default_false",
|
include_blocked: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
ResponseBase {
|
ResponseBase {
|
||||||
gray: Vec<PublicNode> = default_vec::<PublicNode>(), "default_vec",
|
gray: Vec<PublicNode>,
|
||||||
white: Vec<PublicNode> = default_vec::<PublicNode>(), "default_vec",
|
white: Vec<PublicNode>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,7 +673,9 @@ mod test {
|
||||||
other::GET_HEIGHT_RESPONSE,
|
other::GET_HEIGHT_RESPONSE,
|
||||||
Some(GetHeightResponse {
|
Some(GetHeightResponse {
|
||||||
base: ResponseBase::OK,
|
base: ResponseBase::OK,
|
||||||
hash: "68bb1a1cff8e2a44c3221e8e1aff80bc6ca45d06fa8eff4d2a3a7ac31d4efe3f".into(),
|
hash: Hex(hex!(
|
||||||
|
"68bb1a1cff8e2a44c3221e8e1aff80bc6ca45d06fa8eff4d2a3a7ac31d4efe3f"
|
||||||
|
)),
|
||||||
height: 3195160,
|
height: 3195160,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -685,9 +686,9 @@ mod test {
|
||||||
test_json(
|
test_json(
|
||||||
other::GET_TRANSACTIONS_REQUEST,
|
other::GET_TRANSACTIONS_REQUEST,
|
||||||
Some(GetTransactionsRequest {
|
Some(GetTransactionsRequest {
|
||||||
txs_hashes: vec![
|
txs_hashes: vec![Hex(hex!(
|
||||||
"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408".into(),
|
"d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
|
||||||
],
|
))],
|
||||||
decode_as_json: false,
|
decode_as_json: false,
|
||||||
prune: false,
|
prune: false,
|
||||||
split: false,
|
split: false,
|
||||||
|
@ -706,9 +707,9 @@ mod test {
|
||||||
other::GET_ALT_BLOCKS_HASHES_RESPONSE,
|
other::GET_ALT_BLOCKS_HASHES_RESPONSE,
|
||||||
Some(GetAltBlocksHashesResponse {
|
Some(GetAltBlocksHashesResponse {
|
||||||
base: AccessResponseBase::OK,
|
base: AccessResponseBase::OK,
|
||||||
blks_hashes: vec![
|
blks_hashes: vec![Hex(hex!(
|
||||||
"8ee10db35b1baf943f201b303890a29e7d45437bd76c2bd4df0d2f2ee34be109".into(),
|
"8ee10db35b1baf943f201b303890a29e7d45437bd76c2bd4df0d2f2ee34be109"
|
||||||
],
|
))],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -719,8 +720,12 @@ mod test {
|
||||||
other::IS_KEY_IMAGE_SPENT_REQUEST,
|
other::IS_KEY_IMAGE_SPENT_REQUEST,
|
||||||
Some(IsKeyImageSpentRequest {
|
Some(IsKeyImageSpentRequest {
|
||||||
key_images: vec![
|
key_images: vec![
|
||||||
"8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3".into(),
|
Hex(hex!(
|
||||||
"7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4".into(),
|
"8d1bd8181bf7d857bdb281e0153d84cd55a3fcaa57c3e570f4a49f935850b5e3"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"7319134bfc50668251f5b899c66b005805ee255c136f0e1cecbb0f3a912e09d4"
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -732,7 +737,7 @@ mod test {
|
||||||
other::IS_KEY_IMAGE_SPENT_RESPONSE,
|
other::IS_KEY_IMAGE_SPENT_RESPONSE,
|
||||||
Some(IsKeyImageSpentResponse {
|
Some(IsKeyImageSpentResponse {
|
||||||
base: AccessResponseBase::OK,
|
base: AccessResponseBase::OK,
|
||||||
spent_status: vec![1, 1],
|
spent_status: vec![KeyImageSpentStatus::SpentInBlockchain; 2],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1255,24 +1260,60 @@ mod test {
|
||||||
Some(GetTransactionPoolHashesResponse {
|
Some(GetTransactionPoolHashesResponse {
|
||||||
base: ResponseBase::OK,
|
base: ResponseBase::OK,
|
||||||
tx_hashes: vec![
|
tx_hashes: vec![
|
||||||
"aa928aed888acd6152c60194d50a4df29b0b851be6169acf11b6a8e304dd6c03".into(),
|
Hex(hex!(
|
||||||
"794345f321a98f3135151f3056c0fdf8188646a8dab27de971428acf3551dd11".into(),
|
"aa928aed888acd6152c60194d50a4df29b0b851be6169acf11b6a8e304dd6c03"
|
||||||
"1e9d2ae11f2168a228942077483e70940d34e8658c972bbc3e7f7693b90edf17".into(),
|
)),
|
||||||
"7375c928f261d00f07197775eb0bfa756e5f23319819152faa0b3c670fe54c1b".into(),
|
Hex(hex!(
|
||||||
"2e4d5f8c5a45498f37fb8b6ca4ebc1efa0c371c38c901c77e66b08c072287329".into(),
|
"794345f321a98f3135151f3056c0fdf8188646a8dab27de971428acf3551dd11"
|
||||||
"eee6d596cf855adfb10e1597d2018e3a61897ac467ef1d4a5406b8d20bfbd52f".into(),
|
)),
|
||||||
"59c574d7ba9bb4558470f74503c7518946a85ea22c60fccfbdec108ce7d8f236".into(),
|
Hex(hex!(
|
||||||
"0d57bec1e1075a9e1ac45cf3b3ced1ad95ccdf2a50ce360190111282a0178655".into(),
|
"1e9d2ae11f2168a228942077483e70940d34e8658c972bbc3e7f7693b90edf17"
|
||||||
"60d627b2369714a40009c07d6185ebe7fa4af324fdfa8d95a37a936eb878d062".into(),
|
)),
|
||||||
"661d7e728a901a8cb4cf851447d9cd5752462687ed0b776b605ba706f06bdc7d".into(),
|
Hex(hex!(
|
||||||
"b80e1f09442b00b3fffe6db5d263be6267c7586620afff8112d5a8775a6fc58e".into(),
|
"7375c928f261d00f07197775eb0bfa756e5f23319819152faa0b3c670fe54c1b"
|
||||||
"974063906d1ddfa914baf85176b0f689d616d23f3d71ed4798458c8b4f9b9d8f".into(),
|
)),
|
||||||
"d2575ae152a180be4981a9d2fc009afcd073adaa5c6d8b022c540a62d6c905bb".into(),
|
Hex(hex!(
|
||||||
"3d78aa80ee50f506683bab9f02855eb10257a08adceda7cbfbdfc26b10f6b1bb".into(),
|
"2e4d5f8c5a45498f37fb8b6ca4ebc1efa0c371c38c901c77e66b08c072287329"
|
||||||
"8b5bc125bdb73b708500f734501d55088c5ac381a0879e1141634eaa72b6a4da".into(),
|
)),
|
||||||
"11c06f4d2f00c912ca07313ed2ea5366f3cae914a762bed258731d3d9e3706df".into(),
|
Hex(hex!(
|
||||||
"b3644dc7c9a3a53465fe80ad3769e516edaaeb7835e16fdd493aac110d472ae1".into(),
|
"eee6d596cf855adfb10e1597d2018e3a61897ac467ef1d4a5406b8d20bfbd52f"
|
||||||
"ed2478ad793b923dbf652c8612c40799d764e5468897021234a14a37346bc6ee".into(),
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"59c574d7ba9bb4558470f74503c7518946a85ea22c60fccfbdec108ce7d8f236"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"0d57bec1e1075a9e1ac45cf3b3ced1ad95ccdf2a50ce360190111282a0178655"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"60d627b2369714a40009c07d6185ebe7fa4af324fdfa8d95a37a936eb878d062"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"661d7e728a901a8cb4cf851447d9cd5752462687ed0b776b605ba706f06bdc7d"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"b80e1f09442b00b3fffe6db5d263be6267c7586620afff8112d5a8775a6fc58e"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"974063906d1ddfa914baf85176b0f689d616d23f3d71ed4798458c8b4f9b9d8f"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"d2575ae152a180be4981a9d2fc009afcd073adaa5c6d8b022c540a62d6c905bb"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"3d78aa80ee50f506683bab9f02855eb10257a08adceda7cbfbdfc26b10f6b1bb"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"8b5bc125bdb73b708500f734501d55088c5ac381a0879e1141634eaa72b6a4da"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"11c06f4d2f00c912ca07313ed2ea5366f3cae914a762bed258731d3d9e3706df"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"b3644dc7c9a3a53465fe80ad3769e516edaaeb7835e16fdd493aac110d472ae1"
|
||||||
|
)),
|
||||||
|
Hex(hex!(
|
||||||
|
"ed2478ad793b923dbf652c8612c40799d764e5468897021234a14a37346bc6ee"
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue