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