mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-11-01 20:07:02 +00:00
derive Debug for various structs
This commit is contained in:
@@ -21,6 +21,7 @@ const SAPLING_VERSION_GROUP_ID: u32 = 0x892F2085;
|
||||
const SAPLING_TX_VERSION: u32 = 4;
|
||||
|
||||
/// A Zcash transaction.
|
||||
#[derive(Debug)]
|
||||
pub struct Transaction(TransactionData);
|
||||
|
||||
impl Deref for Transaction {
|
||||
@@ -48,6 +49,41 @@ pub struct TransactionData {
|
||||
pub binding_sig: Option<Signature>,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for TransactionData {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"TransactionData(
|
||||
overwintered = {:?},
|
||||
version = {:?},
|
||||
version_group_id = {:?},
|
||||
vin = {:?},
|
||||
vout = {:?},
|
||||
lock_time = {:?},
|
||||
expiry_height = {:?},
|
||||
value_balance = {:?},
|
||||
shielded_spends = {:?},
|
||||
shielded_outputs = {:?},
|
||||
joinsplits = {:?},
|
||||
joinsplit_pubkey = {:?},
|
||||
binding_sig = {:?})",
|
||||
self.overwintered,
|
||||
self.version,
|
||||
self.version_group_id,
|
||||
self.vin,
|
||||
self.vout,
|
||||
self.lock_time,
|
||||
self.expiry_height,
|
||||
self.value_balance,
|
||||
self.shielded_spends,
|
||||
self.shielded_outputs,
|
||||
self.joinsplits,
|
||||
self.joinsplit_pubkey,
|
||||
self.binding_sig
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl TransactionData {
|
||||
pub fn new() -> Self {
|
||||
TransactionData {
|
||||
|
||||
Reference in New Issue
Block a user