output enum
Some checks are pending
Audit / audit (push) Waiting to run
Deny / audit (push) Waiting to run

This commit is contained in:
hinto.janai 2024-09-25 21:27:50 -04:00
parent 2643902ecc
commit ea80e666b2
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
2 changed files with 14 additions and 10 deletions

View file

@ -45,7 +45,7 @@ pub enum MinerTransaction {
/// This field is flattened.
#[serde(flatten)]
prefix: MinerTransactionPrefix,
rct_signatures: MinerTransactionRctSignature,
rct_signatures: MinerTransactionRctSignatures,
},
}
@ -60,7 +60,7 @@ impl Default for MinerTransaction {
#[derive(Copy, Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct MinerTransactionRctSignature {
pub struct MinerTransactionRctSignatures {
pub r#type: u8,
}

View file

@ -14,16 +14,20 @@ pub struct Output {
pub target: Target,
}
#[derive(Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Target {
/// Should be [`None`] if [`Self::tagged_key`] is [`Some`]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(untagged)]
pub enum Target {
Key { key: String },
TaggedKey { tagged_key: TaggedKey },
}
/// Should be [`None`] if [`Self::key`] is [`Some`]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tagged_key: Option<TaggedKey>,
impl Default for Target {
fn default() -> Self {
Self::Key {
key: Default::default(),
}
}
}
#[derive(Clone, Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]