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 625ccf4 commit bb5d684
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions internal/evmreader/application_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ func (a *ApplicationContractAdapter) RetrieveOutputExecutionEvents(
outputExecutedEvent := itr.Event
events = append(events, outputExecutedEvent)
}
err = itr.Error()
if err != nil {
if err = itr.Error(); err != nil {
return nil, err
}
return events, nil
Expand Down
3 changes: 2 additions & 1 deletion internal/evmreader/evmreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ type application struct {
consensusContract ConsensusContract
}

// EvmReader reads Input Added and Claim Submitted events from the blockchain
// EvmReader reads Input Added, Claim Submitted and
// Output Executed events from the blockchain
type EvmReader struct {
client EthClient
wsClient EthWsClient
Expand Down
8 changes: 4 additions & 4 deletions internal/evmreader/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func (r *EvmReader) checkForOutputExecution(

if mostRecentBlockNumber > LastOutputCheck {

slog.Info("Checking output execution for applications",
"apps", appAddresses,
slog.Info("Checking output execution for application",
"app", app.ContractAddress,
"last output check block", LastOutputCheck,
"most recent block", mostRecentBlockNumber)

Expand All @@ -44,13 +44,13 @@ func (r *EvmReader) checkForOutputExecution(
} else if mostRecentBlockNumber < LastOutputCheck {
slog.Warn(
"Not reading output execution: most recent block is lower than the last processed one", //nolint:lll
"apps", appAddresses,
"app", app.ContractAddress,
"last output check block", LastOutputCheck,
"most recent block", mostRecentBlockNumber,
)
} else {
slog.Info("Not reading output execution: already checked the most recent blocks",
"apps", appAddresses,
"app", app.ContractAddress,
"last output check block", LastOutputCheck,
"most recent block", mostRecentBlockNumber,
)
Expand Down

0 comments on commit bb5d684

Please sign in to comment.