Skip to content

Commit 6ab79d4

Browse files
authored
Merge branch 'main' into feat/set-code-tx-encoding
2 parents 05c0bbc + 2ace506 commit 6ab79d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

encoding/codecv7_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ const (
4949

5050
// Below is the encoding for blobPayloadV7.
5151
// * Field Bytes Type Index Comments
52-
// * prevL1MessageQueueHash 32 bytes32 0 hash of the L1 message queue at the end of previous batch
52+
// * prevL1MessageQueueHash 32 bytes32 0 hash of the L1 message queue at the end of previous batch
5353
// * postL1MessageQueueHash 32 bytes32 32 hash of the L1 message queue at the end of this batch
5454
// * initialL2BlockNumber 8 uint64 64 The initial L2 block number in this batch
5555
// * numBlocks 2 uint16 72 The number of blocks in this batch
56-
// * block[0] 52 DABlock7 74 The first block in this batch
57-
// * block[i] 52 DABlock7 74+52*i The (i+1)th block in this batch
58-
// * block[n-1] 52 DABlock7 74+52*(n-1) The last block in this batch
56+
// * block[0] 52 DABlock7 74 The first block in this batch
57+
// * block[i] 52 DABlock7 74+52*i The (i+1)th block in this batch
58+
// * block[n-1] 52 DABlock7 74+52*(n-1) The last block in this batch
5959
// * l2Transactions dynamic bytes 74+52*n L2 transactions for this batch
6060

6161
const (
@@ -517,7 +517,7 @@ func encodeSize3Bytes(data uint32) []byte {
517517
// The function calls the blockCallBack for each block with the block and the corresponding daBlock.
518518
func iterateAndVerifyBlocksAndL1Messages(prevL1MessageQueueHash, postL1MessageQueueHash common.Hash, blocks []*Block, totalL1MessagePoppedBefore *uint64, initialL2BlockNumberCallback func(initialL2BlockNumber uint64), blockCallBack func(block *Block, daBlock *daBlockV7) error) error {
519519
if len(blocks) == 0 {
520-
return nil
520+
return errors.New("no blocks to iterate")
521521
}
522522

523523
if !blocks[0].Header.Number.IsUint64() {

0 commit comments

Comments
 (0)