Skip to content

Commit 2018415

Browse files
committed
++
1 parent 2a3ec9f commit 2018415

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

block/internal/executing/executor.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,6 @@ func (e *Executor) produceBlock() error {
395395
return fmt.Errorf("failed to apply block: %w", err)
396396
}
397397

398-
if len(newState.AppHash) == 0 {
399-
return fmt.Errorf("execution client returned empty app hash")
400-
}
401-
402398
// Update header's AppHash if needed and recompute state's LastHeaderHash to match
403399
headerModified := false
404400
switch {

block/internal/syncing/syncer.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,7 @@ func (s *Syncer) trySyncNextBlock(event *common.DAHeightEvent) error {
551551
return fmt.Errorf("failed to apply block: %w", err)
552552
}
553553

554-
if len(newState.AppHash) == 0 {
555-
return fmt.Errorf("execution client returned empty app hash")
556-
}
554+
// Validate header's AppHash against execution result (if header has an AppHash set)
557555
if len(header.AppHash) != 0 && !bytes.Equal(header.AppHash, newState.AppHash) {
558556
return fmt.Errorf("header app hash mismatch - got: %x, want: %x", header.AppHash, newState.AppHash)
559557
}

0 commit comments

Comments
 (0)