- cargo fmt across the workspace (the CI gate the last push tripped). - varde-daemon: drop the now-unused bytes dependency. - varde-ctl(1): document push; gc reflects the continuous-sweep reality; subscribe mentions push events. - config.toml example: gc_interval_secs, and an honest note that max_download_bytes_per_sec is currently unenforced. - LICENSE-MIT + LICENSE-APACHE at the root (the declared license now ships as files), bundled into release tarballs and installed by the PKGBUILD. - PKGBUILD: real maintainer, AUR pre-flight note (updpkgsums), license installation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c52c3b1238
commit
5d29bdc4bd
@@ -197,10 +197,7 @@ impl BlobStore {
|
||||
Ok((root, total, StoredFormat::HashSeq))
|
||||
}
|
||||
|
||||
async fn import_one(
|
||||
&self,
|
||||
path: PathBuf,
|
||||
) -> Result<(iroh_blobs::api::TempTag, u64), OpError> {
|
||||
async fn import_one(&self, path: PathBuf) -> Result<(iroh_blobs::api::TempTag, u64), OpError> {
|
||||
let tag = self
|
||||
.store
|
||||
.add_path_with_opts(AddPathOptions {
|
||||
@@ -211,7 +208,13 @@ impl BlobStore {
|
||||
.temp_tag()
|
||||
.await
|
||||
.map_err(internal)?;
|
||||
let size = match self.store.blobs().status(tag.hash()).await.map_err(internal)? {
|
||||
let size = match self
|
||||
.store
|
||||
.blobs()
|
||||
.status(tag.hash())
|
||||
.await
|
||||
.map_err(internal)?
|
||||
{
|
||||
BlobStatus::Complete { size } => size,
|
||||
_ => {
|
||||
return Err(OpError::Internal(anyhow::anyhow!(
|
||||
@@ -335,7 +338,11 @@ impl BlobStore {
|
||||
// report the bytes actually present and verified.
|
||||
let bitfield = self.store.blobs().observe(hash).await.map_err(internal)?;
|
||||
let total = bitfield.validated_size().or(size);
|
||||
Ok((bitfield.total_bytes().min(total.unwrap_or(u64::MAX)), total, false))
|
||||
Ok((
|
||||
bitfield.total_bytes().min(total.unwrap_or(u64::MAX)),
|
||||
total,
|
||||
false,
|
||||
))
|
||||
}
|
||||
BlobStatus::Complete { size } => Ok((size, Some(size), true)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user