Reexports and public submodules
@@ -10,8 +10,9 @@ pub use self::memorydb::MemoryDB;
pub use self::keys::StorageKey;
pub use self::values::StorageValue;
-pub use self::base_index::{BaseIndex, BaseIndexIter};
pub use self::entry::Entry;
+
+pub use self::base_index::{BaseIndex, BaseIndexIter};
pub use self::map_index::MapIndex;
pub use self::list_index::ListIndex;
pub use self::key_set_index::KeySetIndex;
@@ -30,29 +31,13 @@ mod memorydb;
mod keys;
mod values;
-mod base_index;
mod entry;
-mod map_index;
-mod list_index;
-mod key_set_index;
-mod value_set_index;
-mod proof_list_index;
-mod proof_map_index;
-
-pub fn pair_hash(h1: &Hash, h2: &Hash) -> Hash {
- let mut v = [0; HASH_SIZE * 2];
- v[..HASH_SIZE].copy_from_slice(h1.as_ref());
- v[HASH_SIZE..].copy_from_slice(h2.as_ref());
- hash(&v)
-}
-
-// pub fn merkle_hash(hashes: &[Hash]) -> Hash {
-// match hashes.len() {
-// 0 => Hash::default(),
-// 1 => hashes[0],
-// n => {
-// let (l, r) = hashes.split_at(n.next_power_of_two() / 2);
-// pair_hash(&merkle_hash(l), &merkle_hash(r))
-// }
-// }
-// }
+
+pub mod base_index;
+
+pub mod map_index;
+pub mod list_index;
+pub mod key_set_index;
+pub mod value_set_index;
+pub mod proof_list_index;
+pub mod proof_map_index;
