@@ -207,14 +207,14 @@ func (o *Operator) UpdateLastProcessBatch(blockNumber uint32) error {
207207func (o * Operator ) Start (ctx context.Context ) error {
208208 // create a new channel to foward errors
209209 subV2ErrorChannel := make (chan chainio.ErrorPair )
210- errorPairPtr := o .SubscribeToNewTasksV2 (subV2ErrorChannel )
211- if errorPairPtr != nil {
210+ errorPair := o .SubscribeToNewTasksV2 (subV2ErrorChannel )
211+ if errorPair != nil {
212212 log .Fatal ("Could not subscribe to new tasks" )
213213 }
214214
215215 subV3ErrorChannel := make (chan chainio.ErrorPair )
216- errorPairPtr = o .SubscribeToNewTasksV3 (subV3ErrorChannel )
217- if errorPairPtr != nil {
216+ errorPair = o .SubscribeToNewTasksV3 (subV3ErrorChannel )
217+ if errorPair != nil {
218218 log .Fatal ("Could not subscribe to new tasks" )
219219 }
220220
@@ -236,14 +236,14 @@ func (o *Operator) Start(ctx context.Context) error {
236236 o .Logger .Errorf ("Metrics server failed" , "err" , err )
237237 case errorPair := <- subV2ErrorChannel :
238238 o .Logger .Infof ("Error in websocket subscription" , "err" , errorPair )
239- errorPairPtr = o .SubscribeToNewTasksV2 (subV2ErrorChannel )
240- if errorPairPtr != nil {
239+ errorPair = o .SubscribeToNewTasksV2 (subV2ErrorChannel )
240+ if errorPair != nil {
241241 o .Logger .Fatal ("Could not subscribe to new tasks V2" )
242242 }
243243 case errorPair := <- subV3ErrorChannel :
244244 o .Logger .Infof ("Error in websocket subscription" , "err" , errorPair )
245- errorPairPtr = o .SubscribeToNewTasksV3 (subV3ErrorChannel )
246- if errorPairPtr != nil {
245+ errorPair = o .SubscribeToNewTasksV3 (subV3ErrorChannel )
246+ if errorPair != nil {
247247 o .Logger .Fatal ("Could not subscribe to new tasks V3" )
248248 }
249249 case newBatchLogV2 := <- o .NewTaskCreatedChanV2 :
0 commit comments