@@ -256,6 +256,8 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
256256 case state.DSL2FullBlock :
257257 l2Block := data
258258
259+ //TODO: remove this log
260+ log .Infof ("start atomic op for l2block %d" , l2Block .L2BlockNumber )
259261 err = s .streamServer .StartAtomicOp ()
260262 if err != nil {
261263 log .Errorf ("failed to start atomic op for l2block %d, error: %v " , l2Block .L2BlockNumber , err )
@@ -267,6 +269,8 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
267269 Value : l2Block .L2BlockNumber ,
268270 }
269271
272+ //TODO: remove this log
273+ log .Infof ("add stream bookmark for l2block %d" , l2Block .L2BlockNumber )
270274 _ , err = s .streamServer .AddStreamBookmark (bookMark .Encode ())
271275 if err != nil {
272276 log .Errorf ("failed to add stream bookmark for l2block %d, error: %v" , l2Block .L2BlockNumber , err )
@@ -281,6 +285,8 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
281285 Value : l2Block .L2BlockNumber - 1 ,
282286 }
283287
288+ //TODO: remove this log
289+ log .Infof ("get previous l2block %d" , l2Block .L2BlockNumber - 1 )
284290 previousL2BlockEntry , err := s .streamServer .GetFirstEventAfterBookmark (bookMark .Encode ())
285291 if err != nil {
286292 log .Errorf ("failed to get previous l2block %d, error: %v" , l2Block .L2BlockNumber - 1 , err )
@@ -303,12 +309,16 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
303309 ChainID : uint32 (chainID ),
304310 }
305311
312+ //TODO: remove this log
313+ log .Infof ("add l2blockStart stream entry for l2block %d" , l2Block .L2BlockNumber )
306314 _ , err = s .streamServer .AddStreamEntry (state .EntryTypeL2BlockStart , blockStart .Encode ())
307315 if err != nil {
308316 log .Errorf ("failed to add stream entry for l2block %d, error: %v" , l2Block .L2BlockNumber , err )
309317 continue
310318 }
311319
320+ //TODO: remove this log
321+ log .Infof ("adding l2tx stream entries for l2block %d" , l2Block .L2BlockNumber )
312322 for _ , l2Transaction := range l2Block .Txs {
313323 _ , err = s .streamServer .AddStreamEntry (state .EntryTypeL2Tx , l2Transaction .Encode ())
314324 if err != nil {
@@ -323,18 +333,25 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
323333 StateRoot : l2Block .StateRoot ,
324334 }
325335
336+ //TODO: remove this log
337+ log .Infof ("add l2blockEnd stream entry for l2block %d" , l2Block .L2BlockNumber )
326338 _ , err = s .streamServer .AddStreamEntry (state .EntryTypeL2BlockEnd , blockEnd .Encode ())
327339 if err != nil {
328340 log .Errorf ("failed to add stream entry for l2block %d, error: %v" , l2Block .L2BlockNumber , err )
329341 continue
330342 }
331343
344+ //TODO: remove this log
345+ log .Infof ("commit atomic op for l2block %d" , l2Block .L2BlockNumber )
332346 err = s .streamServer .CommitAtomicOp ()
333347 if err != nil {
334348 log .Errorf ("failed to commit atomic op for l2block %d, error: %v " , l2Block .L2BlockNumber , err )
335349 continue
336350 }
337351
352+ //TODO: remove this log
353+ log .Infof ("l2block %d sent to datastream" , l2Block .L2BlockNumber )
354+
338355 // Stream a bookmark
339356 case state.DSBookMark :
340357 bookmark := data
0 commit comments