Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Nov 4, 2024
1 parent 5fa6057 commit 63affef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ func (m *Manager) updateFromLastSettlementState() error {

// update last block submitted time from last batch when starting the node
m.LastSettlementHeight.Store(latestHeight)
lastBlockTimestamp := res.BlockDescriptors[len(res.BlockDescriptors)-1].GetTimestamp()
m.State.SetLastSubmittedBlockTime(lastBlockTimestamp)

if latestHeight >= m.State.NextHeight() {
m.UpdateTargetHeight(latestHeight)
Expand Down
4 changes: 4 additions & 0 deletions block/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func (m *Manager) SettlementValidateLoop(ctx context.Context) error {
uevent.MustPublish(ctx, m.Pubsub, &events.DataHealthStatus{Error: err}, events.HealthStatusList)
return err
}

lastBlockTimestamp := batch.BlockDescriptors[len(batch.BlockDescriptors)-1].GetTimestamp()
m.State.SetLastSubmittedBlockTime(lastBlockTimestamp)

// validate batch
err = m.SettlementValidator.ValidateStateUpdate(batch)
if err != nil {
Expand Down

0 comments on commit 63affef

Please sign in to comment.