mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-17 01:17:36 +00:00
Add Clone/Debug derivations to structs
This commit is contained in:
parent
703b18c6e8
commit
ec6927e66e
3 changed files with 10 additions and 0 deletions
|
@ -3,6 +3,7 @@ use crate::{
|
|||
transaction::Transaction
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct BlockHeader {
|
||||
pub major_version: u64,
|
||||
pub minor_version: u64,
|
||||
|
@ -33,6 +34,7 @@ impl BlockHeader {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Block {
|
||||
pub header: BlockHeader,
|
||||
pub miner_tx: Transaction,
|
||||
|
|
|
@ -4,6 +4,7 @@ use curve25519_dalek::{scalar::Scalar, edwards::EdwardsPoint};
|
|||
|
||||
use crate::{Commitment, wallet::TransactionError, serialize::*};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Bulletproofs {
|
||||
pub A: EdwardsPoint,
|
||||
pub S: EdwardsPoint,
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{
|
|||
bulletproofs::Bulletproofs, clsag::Clsag,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Input {
|
||||
Gen(u64),
|
||||
|
||||
|
@ -51,6 +52,7 @@ impl Input {
|
|||
}
|
||||
|
||||
// Doesn't bother moving to an enum for the unused Script classes
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Output {
|
||||
pub amount: u64,
|
||||
pub key: EdwardsPoint,
|
||||
|
@ -86,6 +88,7 @@ impl Output {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TransactionPrefix {
|
||||
pub version: u64,
|
||||
pub unlock_time: u64,
|
||||
|
@ -121,6 +124,7 @@ impl TransactionPrefix {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RctBase {
|
||||
pub fee: u64,
|
||||
pub ecdh_info: Vec<[u8; 8]>,
|
||||
|
@ -153,6 +157,7 @@ impl RctBase {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum RctPrunable {
|
||||
Null,
|
||||
Clsag {
|
||||
|
@ -209,6 +214,7 @@ impl RctPrunable {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RctSignatures {
|
||||
pub base: RctBase,
|
||||
pub prunable: RctPrunable
|
||||
|
@ -226,6 +232,7 @@ impl RctSignatures {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Transaction {
|
||||
pub prefix: TransactionPrefix,
|
||||
pub rct_signatures: RctSignatures
|
||||
|
|
Loading…
Reference in a new issue