From f369d08b91abe452d3f278341eab652b9395bdeb Mon Sep 17 00:00:00 2001 From: Magamedrasul Ibragimov Date: Fri, 27 Jan 2023 15:07:35 +0400 Subject: [PATCH] chore: remove batch_insert feature & make it default --- Cargo.toml | 8 ++++---- README.md | 6 ------ src/tree.rs | 3 +-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ea89dd5..c89d938 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,12 +3,12 @@ name = "pmtree" version = "0.1.0" edition = "2021" -[features] -batch_insert = [] - [dev-dependencies] hex-literal = "0.3.4" tiny-keccak = { version = "2.0.2", features = ["keccak"] } sled = "0.34.7" rln = { git = "https://github.com/vacp2p/zerokit", rev = "490206a" } -ark-serialize = "0.3.0" \ No newline at end of file +ark-serialize = "0.3.0" + +[dependencies] +rayon = { version = "1.6.1", optional = false } diff --git a/README.md b/README.md index 5ea46f2..cb357e3 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,6 @@ pmtree = { git = "https://github.com/Rate-Limiting-Nullifier/pmtree" } ``` -To use batch insertions you must enable `batch_insert` feature: -```toml -[dependencies] -pmtree = { git = "https://github.com/Rate-Limiting-Nullifier/pmtree", features = ["batch_insert"] } -``` - ## Example In-Memory DB (HashMap) + Keccak diff --git a/src/tree.rs b/src/tree.rs index 153a12a..cce95db 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -194,9 +194,8 @@ where } /// Batch insertion, updates the tree in parallel. - /// Only available as a feature - #[cfg(feature = "batch_insert")] pub fn batch_insert(&mut self, leaves: &[H::Fr]) -> Result<()> { + // if leaves.len() Ok(()) }