@@ -210,6 +210,7 @@ type BOLDStaker struct {
210210 confirmedNotifiers []legacystaker.LatestConfirmedNotifier
211211 inboxTracker staker.InboxTrackerInterface
212212 inboxStreamer staker.TransactionStreamerInterface
213+ fatalErr chan <- error
213214}
214215
215216func NewBOLDStaker (
@@ -229,6 +230,7 @@ func NewBOLDStaker(
229230 inboxTracker staker.InboxTrackerInterface ,
230231 inboxStreamer staker.TransactionStreamerInterface ,
231232 inboxReader staker.InboxReaderInterface ,
233+ fatalErr chan <- error ,
232234) (* BOLDStaker , error ) {
233235 if err := config .Validate (); err != nil {
234236 return nil , err
@@ -251,6 +253,7 @@ func NewBOLDStaker(
251253 confirmedNotifiers : confirmedNotifiers ,
252254 inboxTracker : inboxTracker ,
253255 inboxStreamer : inboxStreamer ,
256+ fatalErr : fatalErr ,
254257 }, nil
255258}
256259
@@ -311,8 +314,10 @@ func (b *BOLDStaker) Start(ctxIn context.Context) {
311314 confirmedMsgCount , confirmedGlobalState , err := b .getLatestState (ctx , true )
312315 if err != nil {
313316 log .Error ("staker: error checking latest confirmed" , "err" , err )
314- b .StopWaiter .StopAndWait ()
315- return time .Duration (0 )
317+ if errors .Is (err , staker .ErrGlobalStateNotInChain ) {
318+ b .fatalErr <- err
319+ }
320+ return b .config .AssertionPostingInterval
316321 }
317322
318323 agreedMsgCount , agreedGlobalState , err := b .getLatestState (ctx , false )
0 commit comments