Skip to content

Commit

Permalink
Fix logs for when espresso should not be enabled (#357)
Browse files Browse the repository at this point in the history
* Fix logs for when espresso should not be enabled

* fix transacion_streamer
  • Loading branch information
Sneh1999 authored Dec 3, 2024
1 parent 78e1499 commit 032d212
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions arbnode/transaction_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,7 @@ func (s *TransactionStreamer) isEspressoMode() (bool, error) {
if !isSetInConfig {
return false, nil
}
if s.lightClientReader != nil && s.espressoClient != nil {
return true, nil
}
log.Error("espresso verifier contract address has been set, no light client reader or espresso client")
return false, nil
return true, nil
}

// Used in redis tests
Expand Down Expand Up @@ -1825,9 +1821,13 @@ func (s *TransactionStreamer) shouldSubmitEspressoTransaction() bool {
func (s *TransactionStreamer) Start(ctxIn context.Context) error {
s.StopWaiter.Start(ctxIn, s)

err := stopwaiter.CallIterativelyWith[struct{}](&s.StopWaiterSafe, s.espressoSwitch, s.newSovereignTxNotifier)
if err != nil {
return err
if s.lightClientReader != nil && s.espressoClient != nil {
err := stopwaiter.CallIterativelyWith[struct{}](&s.StopWaiterSafe, s.espressoSwitch, s.newSovereignTxNotifier)
if err != nil {
return err
}
} else {
log.Warn("light client reader or espresso client not set, skipping espresso verification")
}

return stopwaiter.CallIterativelyWith[struct{}](&s.StopWaiterSafe, s.executeMessages, s.newMessageNotifier)
Expand Down

0 comments on commit 032d212

Please sign in to comment.