Add signed_root to tree_hash crate

This commit is contained in:
Paul Hauner
2019-04-16 11:14:28 +10:00
parent d840d6e2d4
commit 024b9e315a
4 changed files with 105 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
pub mod cached_tree_hash;
pub mod signed_root;
pub mod standard_tree_hash;
pub const BYTES_PER_CHUNK: usize = 32;
@@ -6,6 +7,7 @@ pub const HASHSIZE: usize = 32;
pub const MERKLE_HASH_CHUNCK: usize = 2 * BYTES_PER_CHUNK;
pub use cached_tree_hash::{BTreeOverlay, CachedTreeHashSubTree, Error, TreeHashCache};
pub use signed_root::SignedRoot;
pub use standard_tree_hash::{efficient_merkleize, TreeHash};
#[derive(Debug, PartialEq, Clone)]

View File

@@ -0,0 +1,5 @@
use crate::TreeHash;
pub trait SignedRoot: TreeHash {
fn signed_root(&self) -> Vec<u8>;
}