chunk remainder at end of each stage
This commit is contained in:
parent
10c2302b55
commit
4ded1cc3d4
@ -124,6 +124,10 @@ impl<'a> BlockChunker<'a> {
|
||||
chunk_hashes.push(self.write_chunk(path));
|
||||
}
|
||||
|
||||
if self.rlps.len() != 0 {
|
||||
chunk_hashes.push(self.write_chunk(path));
|
||||
}
|
||||
|
||||
chunk_hashes
|
||||
}
|
||||
}
|
||||
@ -152,6 +156,7 @@ impl<'a> StateChunker<'a> {
|
||||
self.write_chunk();
|
||||
}
|
||||
|
||||
self.cur_size += pair.len();
|
||||
self.rlps.push(pair);
|
||||
}
|
||||
|
||||
@ -210,6 +215,10 @@ impl<'a> StateChunker<'a> {
|
||||
chunker.push(account_key, fat_rlp);
|
||||
}
|
||||
|
||||
if chunker.cur_size != 0 {
|
||||
chunker.write_chunk();
|
||||
}
|
||||
|
||||
Ok(chunker.hashes)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user