mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00
Compare commits
1 Commits
bd7e7f48e8
...
e7cda8924d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e7cda8924d |
@ -483,9 +483,10 @@ impl LogSyncManager {
|
|||||||
let store = self.store.clone();
|
let store = self.store.clone();
|
||||||
let shard_config = store.flow().get_shard_config();
|
let shard_config = store.flow().get_shard_config();
|
||||||
let start_segment_index = tx.start_entry_index as usize / PORA_CHUNK_SIZE;
|
let start_segment_index = tx.start_entry_index as usize / PORA_CHUNK_SIZE;
|
||||||
let end_segment_index =
|
let sector_size = bytes_to_chunks(tx.size as usize);
|
||||||
(tx.start_entry_index as usize + bytes_to_chunks(tx.size as usize) - 1)
|
let end_segment_index = start_segment_index
|
||||||
/ PORA_CHUNK_SIZE;
|
+ ((sector_size + PORA_CHUNK_SIZE - 1) / PORA_CHUNK_SIZE)
|
||||||
|
- 1;
|
||||||
let mut can_finalize = false;
|
let mut can_finalize = false;
|
||||||
if end_segment_index < shard_config.shard_id {
|
if end_segment_index < shard_config.shard_id {
|
||||||
can_finalize = true;
|
can_finalize = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user