Skip to content

Commit

Permalink
(fix) Resize decompression buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
rrw-zilliqa committed Feb 8, 2025
1 parent 1897352 commit b4b7a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zilliqa/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ impl Db {
const SUPPORTED_VERSION: u32 = 3;

// Decompress file and write to temp file
let input_filename = path.as_ref();
let buf_reader: BufReader<File> = BufReader::new(File::open(input_filename)?);
let input_file = File::open(path.as_ref())?;
let buf_reader: BufReader<File> = BufReader::with_capacity(128 * 1024 * 1024, input_file);
let mut reader = Decoder::new(buf_reader)?;
let trie_storage = Arc::new(self.state_trie()?);
let mut state_trie = EthTrie::new(trie_storage.clone());
Expand Down

0 comments on commit b4b7a60

Please sign in to comment.