Skip to content

Commit 27068cf

Browse files
kodemartinalexsporn
authored andcommitted
fix(indexer): get system summary conditionally in index_epoch
1 parent 7d0671d commit 27068cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/iota-indexer/src/handlers/checkpoint_handler.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ impl CheckpointHandler {
207207
} = data;
208208

209209
// Genesis epoch
210-
let system_state =
211-
get_iota_system_state(&checkpoint_object_store)?.into_iota_system_state_summary();
212210
if *checkpoint_summary.sequence_number() == 0 {
213211
info!("Processing genesis epoch");
212+
let system_state =
213+
get_iota_system_state(&checkpoint_object_store)?.into_iota_system_state_summary();
214214
return Ok(Some(EpochToCommit {
215215
last_epoch: None,
216216
new_epoch: IndexedEpochInfo::from_new_system_state_summary(
@@ -227,6 +227,8 @@ impl CheckpointHandler {
227227
return Ok(None);
228228
}
229229

230+
let system_state =
231+
get_iota_system_state(&checkpoint_object_store)?.into_iota_system_state_summary();
230232
let event = transactions
231233
.iter()
232234
.flat_map(|t| t.events.as_ref().map(|e| &e.data))

0 commit comments

Comments
 (0)