diff --git a/zk/stages/stage_sequence_execute_utils.go b/zk/stages/stage_sequence_execute_utils.go index a84bc72b3e0..367e80799b5 100644 --- a/zk/stages/stage_sequence_execute_utils.go +++ b/zk/stages/stage_sequence_execute_utils.go @@ -270,9 +270,10 @@ func prepareL1AndInfoTreeRelatedStuff(sdb *stageDb, batchState *BatchState, prop if l1TreeUpdateIndex, l1TreeUpdate, err = calculateNextL1TreeUpdateToUse(infoTreeIndexProgress, sdb.hermezDb, proposedTimestamp); err != nil { return } - if l1TreeUpdateIndex > 0 { - infoTreeIndexProgress = l1TreeUpdateIndex - } + } + + if l1TreeUpdateIndex > 0 { + infoTreeIndexProgress = l1TreeUpdateIndex } // we only want GER and l1 block hash for indexes above 0 - 0 is a special case