Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(iroh-bytes): use latest bao tree #2101

Merged
merged 1 commit into from
Mar 20, 2024
Merged
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
5 changes: 3 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion iroh-base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ workspace = true

[dependencies]
anyhow = { version = "1" }
bao-tree = { version = "0.10", features = ["tokio_fsm"], default-features = false, optional = true }
bao-tree = { version = "0.10.2", features = ["tokio_fsm"], default-features = false, optional = true }
data-encoding = { version = "2.3.3", optional = true }
hex = "0.4.3"
multibase = { version = "0.9.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion iroh-bytes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workspace = true

[dependencies]
anyhow = { version = "1" }
bao-tree = { version = "0.10", features = ["tokio_fsm"], default-features = false }
bao-tree = { version = "0.10.2", features = ["tokio_fsm"], default-features = false }
bytes = { version = "1.4", features = ["serde"] }
chrono = "0.4.31"
data-encoding = "2.3.3"
Expand Down
6 changes: 0 additions & 6 deletions iroh-bytes/src/store/bao_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ impl SizeInfo {

/// Persist into a file where each chunk has its own slot.
fn persist(&self, mut target: impl WriteAt) -> io::Result<()> {
if self.offset & ((IROH_BLOCK_SIZE.bytes() as u64) - 1) != 0 {
return Err(io::Error::new(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not really make sense. It is perfectly fine to get sub chunk group data, e.g. if you request 1 chunk.

io::ErrorKind::InvalidData,
"offset not aligned",
));
}
let size_offset = (self.offset >> IROH_BLOCK_SIZE.0) << 3;
target.write_all_at(size_offset, self.size.to_le_bytes().as_slice())?;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion iroh-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ doc = false

[dependencies]
anyhow = "1.0.81"
bao-tree = "0.10.1"
bao-tree = { version = "0.10.2" }
bytes = "1.5.0"
clap = { version = "4", features = ["derive"] }
colored = { version = "2.0.4" }
Expand Down
2 changes: 1 addition & 1 deletion iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ workspace = true

[dependencies]
anyhow = { version = "1" }
bao-tree = { version = "0.10", features = ["tokio_fsm"], default-features = false }
bao-tree = { version = "0.10.2", features = ["tokio_fsm"], default-features = false }
bytes = "1"
data-encoding = "2.4.0"
derive_more = { version = "1.0.0-beta.1", features = ["debug", "display", "from", "try_into", "from_str"] }
Expand Down
Loading