Skip to content

Commit

Permalink
Don't derive Serialize & Deserialize for txids
Browse files Browse the repository at this point in the history
Deriving `serde::Serialize` & `serde::Deserialize` for
`transaction::Hash` was superfluous, and we didn't need it anywhere in
the code.
  • Loading branch information
upbqdn committed Dec 12, 2024
1 parent bc32ddb commit c9088f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zebra-chain/src/transaction/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use std::{fmt, sync::Arc};
use proptest_derive::Arbitrary;

use hex::{FromHex, ToHex};
use serde::{Deserialize, Serialize};

use crate::serialization::{
ReadZcashExt, SerializationError, WriteZcashExt, ZcashDeserialize, ZcashSerialize,
Expand All @@ -56,7 +55,7 @@ use super::{txid::TxIdBuilder, AuthDigest, Transaction};
///
/// [ZIP-244]: https://zips.z.cash/zip-0244
/// [Spec: Transaction Identifiers]: https://zips.z.cash/protocol/protocol.pdf#txnidentifiers
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize, Hash)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[cfg_attr(any(test, feature = "proptest-impl"), derive(Arbitrary))]
pub struct Hash(pub [u8; 32]);

Expand Down

0 comments on commit c9088f8

Please sign in to comment.