mirror of https://github.com/vacp2p/pmtree.git
chore: remove batch_insert feature & make it default
This commit is contained in:
parent
75aa714030
commit
f369d08b91
|
@ -3,12 +3,12 @@ name = "pmtree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
|
||||||
batch_insert = []
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex-literal = "0.3.4"
|
hex-literal = "0.3.4"
|
||||||
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
|
tiny-keccak = { version = "2.0.2", features = ["keccak"] }
|
||||||
sled = "0.34.7"
|
sled = "0.34.7"
|
||||||
rln = { git = "https://github.com/vacp2p/zerokit", rev = "490206a" }
|
rln = { git = "https://github.com/vacp2p/zerokit", rev = "490206a" }
|
||||||
ark-serialize = "0.3.0"
|
ark-serialize = "0.3.0"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rayon = { version = "1.6.1", optional = false }
|
||||||
|
|
|
@ -16,12 +16,6 @@
|
||||||
pmtree = { git = "https://github.com/Rate-Limiting-Nullifier/pmtree" }
|
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
|
## Example
|
||||||
|
|
||||||
In-Memory DB (HashMap) + Keccak
|
In-Memory DB (HashMap) + Keccak
|
||||||
|
|
|
@ -194,9 +194,8 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Batch insertion, updates the tree in parallel.
|
/// 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<()> {
|
pub fn batch_insert(&mut self, leaves: &[H::Fr]) -> Result<()> {
|
||||||
|
// if leaves.len()
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue