@@ -377,7 +377,7 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
377
377
}
378
378
}
379
379
380
- var batchesToSubmit []* dbBatchWithChunksAndParent
380
+ var batchesToSubmit []* dbBatchWithChunks
381
381
for i , dbBatch := range dbBatches {
382
382
var dbChunks []* orm.Chunk
383
383
var dbParentBatch * orm.Batch
@@ -433,10 +433,9 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
433
433
}
434
434
435
435
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 ,
440
439
})
441
440
}
442
441
@@ -523,7 +522,7 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
523
522
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 ())
524
523
}
525
524
526
- func (r * Layer2Relayer ) contextIDFromBatches (batches []* dbBatchWithChunksAndParent ) string {
525
+ func (r * Layer2Relayer ) contextIDFromBatches (batches []* dbBatchWithChunks ) string {
527
526
contextIDs := []string {"v7" }
528
527
529
528
for _ , batch := range batches {
@@ -541,10 +540,9 @@ func (r *Layer2Relayer) batchHashesFromContextID(contextID string) []string {
541
540
return []string {contextID }
542
541
}
543
542
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
548
546
}
549
547
550
548
// ProcessPendingBundles submits proof to layer 1 rollup contract
@@ -898,7 +896,7 @@ func (r *Layer2Relayer) handleL2RollupRelayerConfirmLoop(ctx context.Context) {
898
896
}
899
897
}
900
898
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 ) {
902
900
var maxBlockHeight uint64
903
901
var totalGasUsed uint64
904
902
blobs := make ([]* kzg4844.Blob , 0 , len (batchesToSubmit ))
@@ -929,7 +927,7 @@ func (r *Layer2Relayer) constructCommitBatchPayloadCodecV7(batchesToSubmit []*db
929
927
930
928
encodingBatch := & encoding.Batch {
931
929
Index : b .Batch .Index ,
932
- ParentBatchHash : common .HexToHash (b .ParentBatch . Hash ),
930
+ ParentBatchHash : common .HexToHash (b .Batch . ParentBatchHash ),
933
931
PrevL1MessageQueueHash : common .HexToHash (b .Batch .PrevL1MessageQueueHash ),
934
932
PostL1MessageQueueHash : common .HexToHash (b .Batch .PostL1MessageQueueHash ),
935
933
Blocks : batchBlocks ,
0 commit comments