chain: move merkle_tree to block::merkle.
This Merkle tree is the SHA256d one used only for including transactions in a block, so it should be kept there in order to not be confused with other Merkle trees (like the note commitment trees).
This commit is contained in:
parent
7298e7c636
commit
ce1e81b274
|
@ -10,6 +10,8 @@ mod height;
|
|||
mod root_hash;
|
||||
mod serialize;
|
||||
|
||||
pub mod merkle;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
use chrono::{DateTime, Duration, Utc};
|
||||
|
||||
use crate::merkle_tree::MerkleTreeRootHash;
|
||||
use crate::serialization::ZcashSerialize;
|
||||
use crate::work::{difficulty::CompactDifficulty, equihash::Solution};
|
||||
|
||||
use super::{BlockHeaderHash, Error};
|
||||
use super::{merkle::MerkleTreeRootHash, BlockHeaderHash, Error};
|
||||
|
||||
/// Block header.
|
||||
///
|
||||
|
|
|
@ -2,11 +2,11 @@ use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
|
|||
use chrono::{TimeZone, Utc};
|
||||
use std::io;
|
||||
|
||||
use crate::merkle_tree::MerkleTreeRootHash;
|
||||
use crate::serialization::ZcashDeserializeInto;
|
||||
use crate::serialization::{ReadZcashExt, SerializationError, ZcashDeserialize, ZcashSerialize};
|
||||
use crate::work::{difficulty::CompactDifficulty, equihash};
|
||||
|
||||
use super::merkle::MerkleTreeRootHash;
|
||||
use super::Block;
|
||||
use super::BlockHeader;
|
||||
use super::BlockHeaderHash;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use crate::merkle_tree::MerkleTreeRootHash;
|
||||
use crate::parameters::Network;
|
||||
use crate::work::{difficulty::CompactDifficulty, equihash};
|
||||
|
||||
|
@ -32,7 +31,7 @@ impl Arbitrary for BlockHeader {
|
|||
// version is interpreted as i32 in the spec, so we are limited to i32::MAX here
|
||||
(4u32..(i32::MAX as u32)),
|
||||
any::<BlockHeaderHash>(),
|
||||
any::<MerkleTreeRootHash>(),
|
||||
any::<merkle::MerkleTreeRootHash>(),
|
||||
any::<[u8; 32]>(),
|
||||
// time is interpreted as u32 in the spec, but rust timestamps are i64
|
||||
(0i64..(u32::MAX as i64)),
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#[macro_use]
|
||||
extern crate serde;
|
||||
|
||||
mod merkle_tree;
|
||||
|
||||
pub mod amount;
|
||||
pub mod block;
|
||||
pub mod parameters;
|
||||
|
|
Loading…
Reference in New Issue