@@ -377,7 +377,7 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
377377 }
378378 }
379379
380- var batchesToSubmit []* dbBatchWithChunksAndParent
380+ var batchesToSubmit []* dbBatchWithChunks
381381 for i , dbBatch := range dbBatches {
382382 var dbChunks []* orm.Chunk
383383 var dbParentBatch * orm.Batch
@@ -433,10 +433,9 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
433433 }
434434
435435 if batchesToSubmitLen < r .cfg .BatchSubmission .MaxBatches {
436- batchesToSubmit = append (batchesToSubmit , & dbBatchWithChunksAndParent {
437- Batch : dbBatch ,
438- Chunks : dbChunks ,
439- ParentBatch : dbParentBatch ,
436+ batchesToSubmit = append (batchesToSubmit , & dbBatchWithChunks {
437+ Batch : dbBatch ,
438+ Chunks : dbChunks ,
440439 })
441440 }
442441
@@ -523,7 +522,7 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
523522 log .Info ("Sent the commitBatches tx to layer1" , "batches count" , len (batchesToSubmit ), "start index" , firstBatch .Index , "start hash" , firstBatch .Hash , "end index" , lastBatch .Index , "end hash" , lastBatch .Hash , "tx hash" , txHash .String ())
524523}
525524
526- func (r * Layer2Relayer ) contextIDFromBatches (batches []* dbBatchWithChunksAndParent ) string {
525+ func (r * Layer2Relayer ) contextIDFromBatches (batches []* dbBatchWithChunks ) string {
527526 contextIDs := []string {"v7" }
528527
529528 for _ , batch := range batches {
@@ -541,10 +540,9 @@ func (r *Layer2Relayer) batchHashesFromContextID(contextID string) []string {
541540 return []string {contextID }
542541}
543542
544- type dbBatchWithChunksAndParent struct {
545- Batch * orm.Batch
546- Chunks []* orm.Chunk
547- ParentBatch * orm.Batch
543+ type dbBatchWithChunks struct {
544+ Batch * orm.Batch
545+ Chunks []* orm.Chunk
548546}
549547
550548// ProcessPendingBundles submits proof to layer 1 rollup contract
@@ -898,7 +896,7 @@ func (r *Layer2Relayer) handleL2RollupRelayerConfirmLoop(ctx context.Context) {
898896 }
899897}
900898
901- func (r * Layer2Relayer ) constructCommitBatchPayloadCodecV7 (batchesToSubmit []* dbBatchWithChunksAndParent , firstBatch , lastBatch * orm.Batch ) ([]byte , []* kzg4844.Blob , uint64 , uint64 , error ) {
899+ func (r * Layer2Relayer ) constructCommitBatchPayloadCodecV7 (batchesToSubmit []* dbBatchWithChunks , firstBatch , lastBatch * orm.Batch ) ([]byte , []* kzg4844.Blob , uint64 , uint64 , error ) {
902900 var maxBlockHeight uint64
903901 var totalGasUsed uint64
904902 blobs := make ([]* kzg4844.Blob , 0 , len (batchesToSubmit ))
@@ -929,7 +927,7 @@ func (r *Layer2Relayer) constructCommitBatchPayloadCodecV7(batchesToSubmit []*db
929927
930928 encodingBatch := & encoding.Batch {
931929 Index : b .Batch .Index ,
932- ParentBatchHash : common .HexToHash (b .ParentBatch . Hash ),
930+ ParentBatchHash : common .HexToHash (b .Batch . ParentBatchHash ),
933931 PrevL1MessageQueueHash : common .HexToHash (b .Batch .PrevL1MessageQueueHash ),
934932 PostL1MessageQueueHash : common .HexToHash (b .Batch .PostL1MessageQueueHash ),
935933 Blocks : batchBlocks ,
0 commit comments