diff --git a/tendermint/src/block/header.rs b/tendermint/src/block/header.rs index 52dfbd3c2..a1c324af4 100644 --- a/tendermint/src/block/header.rs +++ b/tendermint/src/block/header.rs @@ -1,15 +1,11 @@ //! Block headers use crate::merkle::simple_hash_from_byte_vectors; +use crate::serializers; use crate::{account, amino_types, block, chain, lite, Hash, Time}; use amino_types::{message::AminoMessage, BlockId, ConsensusVersion, TimeMsg}; use serde::{de::Error as _, Deserialize, Deserializer, Serialize}; use std::str::FromStr; -use { - crate::serializers, - serde::{Deserialize, Serialize}, -}; - /// Block `Header` values contain metadata about the block and about the /// consensus, as well as commitments to the data in the current block, the /// previous block, and the results returned by the application. diff --git a/tendermint/src/block/id.rs b/tendermint/src/block/id.rs index 0ac41e4bc..37ceff027 100644 --- a/tendermint/src/block/id.rs +++ b/tendermint/src/block/id.rs @@ -16,7 +16,7 @@ pub const PREFIX_LENGTH: usize = 10; /// as well as the number of parts in the block. /// /// -#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord)] pub struct Id { /// The block's main hash is the Merkle root of all the fields in the /// block header. diff --git a/tendermint/src/hash.rs b/tendermint/src/hash.rs index bc9ba0bff..236ee4114 100644 --- a/tendermint/src/hash.rs +++ b/tendermint/src/hash.rs @@ -25,12 +25,6 @@ pub enum Hash { Sha256([u8; SHA256_HASH_SIZE]), } -impl Default for Hash { - fn default() -> Hash { - Hash::Null - } -} - impl Hash { #[allow(clippy::new_ret_no_self)] /// Create a new `Hash` with the given algorithm type diff --git a/tendermint/src/validator.rs b/tendermint/src/validator.rs index 5f369f22f..6a2307aca 100644 --- a/tendermint/src/validator.rs +++ b/tendermint/src/validator.rs @@ -36,7 +36,7 @@ impl lite::ValidatorSet for Set { .iter() .map(|validator| validator.hash_bytes()) .collect(); - Hash::Sha256(merkle::simple_hash_from_byte_slices(validator_bytes)) + Hash::Sha256(merkle::simple_hash_from_byte_vectors(validator_bytes)) } fn total_power(&self) -> u64 {