Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM committed Jun 19, 2024
1 parent 1fbe854 commit 76543c0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tools/datastreamer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,16 +806,18 @@ func (h *handler) handleReceivedDataStream(entry *datastreamer.FileEntry, client
}

// Print batch data
batchl2Data, err := state.EncodeBatchV2(&h.currentStreamBatchRaw)
if err != nil {
log.Errorf("Error encoding batch: %v", err)
return err
if h.currentStreamBatch.BatchNumber != 0 {
batchl2Data, err := state.EncodeBatchV2(&h.currentStreamBatchRaw)
if err != nil {
log.Errorf("Error encoding batch: %v", err)
return err
}

// Log batchL2Data as hex string
printColored(color.FgGreen, "BatchL2Data.....: ")
printColored(color.FgHiWhite, fmt.Sprintf("%s\n", "0x"+common.Bytes2Hex(batchl2Data)))
}

// Log batchL2Data as hex string
printColored(color.FgGreen, "BatchL2Data.....: ")
printColored(color.FgHiWhite, fmt.Sprintf("%s\n", "0x"+common.Bytes2Hex(batchl2Data)))

os.Exit(0)
return nil
case datastreamer.EntryType(datastream.EntryType_ENTRY_TYPE_L2_BLOCK):
Expand Down

0 comments on commit 76543c0

Please sign in to comment.