mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-23 16:43:24 +03:00
hotfix fs mem buffer (#8)
This commit is contained in:
parent
fd1437ecc9
commit
2aa9a300ba
@ -487,10 +487,10 @@ impl Manifest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculate the position for the chunk in memory chunks
|
// calculate the position for the chunk in memory chunks
|
||||||
let position = memory_buffer.len() - chunk_data.len();
|
|
||||||
let proper_position = if copy {
|
let proper_position = if copy {
|
||||||
ChunkLocation::ColdStorage(is_local)
|
ChunkLocation::ColdStorage(is_local)
|
||||||
} else {
|
} else {
|
||||||
|
let position = memory_buffer.len() - chunk_data.len();
|
||||||
ChunkLocation::Memory(position as u64)
|
ChunkLocation::Memory(position as u64)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1229,7 +1229,7 @@ async fn verify_manifest(
|
|||||||
) -> tokio::io::Result<()> {
|
) -> tokio::io::Result<()> {
|
||||||
for (file, in_memory_file) in manifest.iter_mut() {
|
for (file, in_memory_file) in manifest.iter_mut() {
|
||||||
let file_hash = in_memory_file.hash();
|
let file_hash = in_memory_file.hash();
|
||||||
// note, do we want to add all chunks here?
|
|
||||||
for (chunk_hash, _, location, _encrypted) in in_memory_file.chunks.values() {
|
for (chunk_hash, _, location, _encrypted) in in_memory_file.chunks.values() {
|
||||||
match location {
|
match location {
|
||||||
ChunkLocation::ColdStorage(local) => {
|
ChunkLocation::ColdStorage(local) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user