Add Clone/Debug derivations to structs

This commit is contained in:
Luke Parker 2022-05-21 21:36:28 -04:00
parent 703b18c6e8
commit ec6927e66e
No known key found for this signature in database
GPG key ID: F9F1386DB1E119B6
3 changed files with 10 additions and 0 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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