From 032d212683ec6146eca4a700d4af297812c12452 Mon Sep 17 00:00:00 2001 From: Sneh Koul <35871990+Sneh1999@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:20:58 -0500 Subject: [PATCH] Fix logs for when espresso should not be enabled (#357) * Fix logs for when espresso should not be enabled * fix transacion_streamer --- arbnode/transaction_streamer.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arbnode/transaction_streamer.go b/arbnode/transaction_streamer.go index 59ebeff2b9..4a7296caf5 100644 --- a/arbnode/transaction_streamer.go +++ b/arbnode/transaction_streamer.go @@ -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 @@ -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)