mirror of
https://github.com/arnaucube/merkletree-rs.git
synced 2026-02-28 05:36:47 +01:00
crate
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "merkletree-rs"
|
name = "merkletree-rs"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["arnaucube <arnaucube@gmail.com>"]
|
authors = ["arnaucube <root@arnaucube.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
description = "Sparse MerkleTree"
|
||||||
|
repository = "https://github.com/arnaucube/merkletree-rs"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tiny-keccak = "1.4.2"
|
tiny-keccak = "1.4.2"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# merkletree-rs [](https://travis-ci.org/arnaucube/merkletree-rs)
|
# merkletree-rs [](https://crates.io/crates/merkletree-rs) [](https://travis-ci.org/arnaucube/merkletree-rs)
|
||||||
Sparse MerkleTree implementation in Rust.
|
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.
|
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.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ extern crate rusty_leveldb;
|
|||||||
|
|
||||||
use self::rusty_leveldb::DB;
|
use self::rusty_leveldb::DB;
|
||||||
|
|
||||||
use constants;
|
use super::constants;
|
||||||
|
|
||||||
pub struct Db {
|
pub struct Db {
|
||||||
storage: DB,
|
storage: DB,
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ extern crate tiny_keccak;
|
|||||||
|
|
||||||
use rustc_hex::ToHex;
|
use rustc_hex::ToHex;
|
||||||
|
|
||||||
mod constants;
|
pub mod constants;
|
||||||
mod db;
|
pub mod db;
|
||||||
mod node;
|
pub mod node;
|
||||||
mod utils;
|
pub mod utils;
|
||||||
|
|
||||||
type Result<T> = std::result::Result<T, String>;
|
type Result<T> = std::result::Result<T, String>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use constants;
|
use super::constants;
|
||||||
use utils;
|
use super::utils;
|
||||||
|
|
||||||
pub struct TreeNode {
|
pub struct TreeNode {
|
||||||
pub child_l: [u8; 32],
|
pub child_l: [u8; 32],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use constants;
|
use super::constants;
|
||||||
use node;
|
use super::node;
|
||||||
use tiny_keccak::Keccak;
|
use tiny_keccak::Keccak;
|
||||||
|
|
||||||
pub fn hash_vec(b: Vec<u8>) -> [u8; 32] {
|
pub fn hash_vec(b: Vec<u8>) -> [u8; 32] {
|
||||||
|
|||||||
Reference in New Issue
Block a user