Skip to content

Commit

Permalink
Merge pull request OffchainLabs#512 from OffchainLabs/silence-validat…
Browse files Browse the repository at this point in the history
…or-context-canceled

Silence validator context canceled error
  • Loading branch information
hkalodner authored Apr 13, 2022
2 parents b7d6484 + f036e68 commit a961c89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion validator/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ func (v *BlockValidator) validate(ctx context.Context, validationStatus *validat
log.Info("starting validation for block", "blockNr", entry.BlockNumber)
gsEnd, delayedMsg, err := v.executeBlock(ctx, entry, preimages, seqMsg, v.validateWasmModuleRoot)
if err != nil {
log.Error("Validation of block failed", "err", err)
if !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) {
log.Error("Validation of block failed", "err", err)
}
return
}
gsExpected := entry.expectedEnd()
Expand Down
4 changes: 0 additions & 4 deletions validator/stateless_block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,6 @@ func (v *StatelessBlockValidator) executeBlock(ctx context.Context, entry *valid
log.Info("validation", "block", entry.BlockNumber, "steps", steps)
}
if err != nil {
if !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) {
log.Error("running machine failed", "err", err)
panic("Failed to run machine: " + err.Error())
}
return GoGlobalState{}, nil, fmt.Errorf("machine execution failed with error: %w", err)
}
steps += count
Expand Down

0 comments on commit a961c89

Please sign in to comment.