Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fxhash = "0.2.1"
crossbeam-channel = "0.5.15"
slab = "0.4.9"
rand = "0.10.1"
getrandom = { version = "0.4.2", default-features = false }
imbl = "3.0.0"
lru = "0.18.0"
libc = "0.2.155"
Expand Down
2 changes: 1 addition & 1 deletion benchtop/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions nomt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ twox-hash.workspace = true
fxhash.workspace = true
crossbeam-channel.workspace = true
slab.workspace = true
rand.workspace = true
rand = { workspace = true, optional = true }
getrandom.workspace = true
imbl.workspace = true
lru.workspace = true
libc.workspace = true
Expand All @@ -36,6 +37,7 @@ io-uring.workspace = true
loom.workspace = true

[dev-dependencies]
rand.workspace = true
rand_pcg.workspace = true
hex-literal.workspace = true
tempfile.workspace = true
Expand All @@ -54,7 +56,7 @@ harness = false

[features]
default = ["blake3-hasher", "sha2-hasher"]
benchmarks = ["dep:criterion"]
benchmarks = ["dep:criterion", "dep:rand"]
fuzz = []
borsh = ["dep:borsh", "nomt-core/borsh"]
blake3-hasher = ["nomt-core/blake3-hasher"]
Expand Down
3 changes: 2 additions & 1 deletion nomt/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub struct Options {
impl Options {
/// Create a new `Options` instance with the default values and a random bitbox seed.
pub fn new() -> Self {
let bitbox_seed: [u8; 16] = rand::random();
let mut bitbox_seed = [0; 16];
getrandom::fill(&mut bitbox_seed).expect("failed to generate bitbox seed");

Self {
path: PathBuf::from("nomt_db"),
Expand Down