Skip to content

Commit

Permalink
fixup! feat(evm-reader): Read output execution statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoura committed Sep 9, 2024
1 parent bb5d684 commit d0e6826
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/evmreader/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (r *EvmReader) checkForOutputExecution(
mostRecentBlockNumber uint64,
) {

appAddresses := appToAddresses(apps)
appAddresses := appsToAddresses(apps)

slog.Debug("Checking for new Output Executed Events", "apps", appAddresses)

Expand Down Expand Up @@ -88,11 +88,13 @@ func (r *EvmReader) readAndUpdateOutputs(
}

if !bytes.Equal(output.RawData, event.Output) {
slog.Debug("Actual output differs from event's",
slog.Debug("Output mismatch",
"app", app.ContractAddress, "index", event.OutputIndex,
"actual", output.RawData, "event's", event.Output)

slog.Error("Output mismatch", "app", app.ContractAddress, "index", event.OutputIndex)
slog.Error("Output mismatch. Application is in an invalid state",
"app", app.ContractAddress,
"index", event.OutputIndex)

return
}
Expand Down

0 comments on commit d0e6826

Please sign in to comment.