diff --git a/Cargo.toml b/Cargo.toml index 326de10..3736f15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "merkletree-rs" version = "0.0.1" -authors = ["arnaucube "] +authors = ["arnaucube "] +edition = "2018" +license = "GPL-3.0" +description = "Sparse MerkleTree" +repository = "https://github.com/arnaucube/merkletree-rs" +readme = "README.md" [dependencies] tiny-keccak = "1.4.2" diff --git a/README.md b/README.md index 8dbfce4..a403d4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# merkletree-rs [![Build Status](https://travis-ci.org/arnaucube/merkletree-rs.svg?branch=master)](https://travis-ci.org/arnaucube/merkletree-rs) +# merkletree-rs [![Crates.io](https://img.shields.io/crates/v/merkletree-rs.svg)](https://crates.io/crates/merkletree-rs) [![Build Status](https://travis-ci.org/arnaucube/merkletree-rs.svg?branch=master)](https://travis-ci.org/arnaucube/merkletree-rs) Sparse MerkleTree implementation in Rust. The MerkleTree is optimized in the design and concepts, to have a faster and lighter MerkleTree, maintaining compatibility with a non optimized MerkleTree. In this way, the MerkleRoot of the optimized MerkleTree will be the same that the MerkleRoot of the non optimized MerkleTree. diff --git a/src/db.rs b/src/db.rs index 4ac917a..fa5c4c5 100644 --- a/src/db.rs +++ b/src/db.rs @@ -2,7 +2,7 @@ extern crate rusty_leveldb; use self::rusty_leveldb::DB; -use constants; +use super::constants; pub struct Db { storage: DB, diff --git a/src/lib.rs b/src/lib.rs index aa28009..cee5f5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,10 +6,10 @@ extern crate tiny_keccak; use rustc_hex::ToHex; -mod constants; -mod db; -mod node; -mod utils; +pub mod constants; +pub mod db; +pub mod node; +pub mod utils; type Result = std::result::Result; diff --git a/src/node.rs b/src/node.rs index 337c772..d556878 100644 --- a/src/node.rs +++ b/src/node.rs @@ -1,5 +1,5 @@ -use constants; -use utils; +use super::constants; +use super::utils; pub struct TreeNode { pub child_l: [u8; 32], diff --git a/src/utils.rs b/src/utils.rs index b544ad1..ef1693b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,5 +1,5 @@ -use constants; -use node; +use super::constants; +use super::node; use tiny_keccak::Keccak; pub fn hash_vec(b: Vec) -> [u8; 32] {