Skip to content

Commit

Permalink
Fix one more bug encountered when writing blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Feb 12, 2025
1 parent 79dbeff commit 5bceeef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions atrium-repo/src/blockstore/car.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ impl<R: AsyncRead + AsyncWrite + AsyncSeek + Send + Unpin> AsyncBlockStoreWrite
let mut buf = unsigned_varint::encode::u64_buffer();
let buf = unsigned_varint::encode::u64((fc.len() + contents.len()) as u64, &mut buf);

self.storage.seek(SeekFrom::End(0)).await?;
self.storage.write_all(buf).await?;
self.storage.write_all(&fc).await?;
let offs = self.storage.stream_position().await?;
Expand Down

0 comments on commit 5bceeef

Please sign in to comment.