Skip to content

Commit

Permalink
exclude last chunk files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed May 8, 2024
1 parent 954e99d commit 64b4725
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pallas-hardano/src/storage/immutable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ fn build_stack_of_chunk_names(dir: &Path) -> Result<ChunkNameSack, std::io::Erro

chunks.sort();
chunks.reverse();
// According to this docs https://mithril.network/doc/glossary/#immutable-file-number,
// the last chunk files are not really immutable.
// So to preserve only immutable data the last chunk files are omitted.
chunks.pop();

Ok(chunks)
}
Expand Down

0 comments on commit 64b4725

Please sign in to comment.