Placeholder net module

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andy Dixon
2026-10-08 10:24:34 +01:00
co-authored by Claude
parent b97c690ef7
commit 24ebede9bb
4 changed files with 6 additions and 2 deletions
+1
View File
@@ -15,3 +15,4 @@ pub mod rng;
pub mod secret;
pub mod store;
pub mod util;
pub mod net;
+3
View File
@@ -0,0 +1,3 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//! Network import: `add URL` and `mirror`. (Being written.)
+1 -1
View File
@@ -765,7 +765,7 @@ fn write_filler(root: &Path, target: u64, pool: Arc<Pool>, entropy: Entropy) ->
let mut rng = entropy.rng(b"filler");
let throwaway = Identity::generate(&mut rng);
let s = Store::new(root, throwaway, pool, true, entropy);
let upper = (target / 8).max(CHUNK_SIZE).min(1 << 30) as f64;
let upper = (target / 8).clamp(CHUNK_SIZE, 1 << 30) as f64;
let count = FILLER_MIN + rng.below(FILLER_MAX - FILLER_MIN + 1);
let mut cat = Catalogue::default();
let (mut i, mut total) = (0u64, 0u64);
+1 -1
View File
@@ -323,7 +323,7 @@ mod tests {
let text = r["json"].as_str().unwrap();
assert_eq!(
&enc[..],
text["{\"name\":".len()..text.find(",\"seed\"").unwrap()].as_bytes(),
&text.as_bytes()["{\"name\":".len()..text.find(",\"seed\"").unwrap()],
"escaping of {n:?}"
);
if VaultName::new(n).is_none() {