Skip to content

Commit d77916b

Browse files
author
Péter Garamvölgyi
committed
fix lint and unit test errors
1 parent be6b422 commit d77916b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

encoding/codecv7_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ func (b *blobPayloadV7) Encode() ([]byte, error) {
259259

260260
// encode L2 txs as RLP and append to transactionBytes
261261
for _, txData := range block.Transactions {
262+
if txData.Type == types.L1MessageTxType {
263+
continue
264+
}
262265
rlpTxData, err := convertTxDataToRLPEncoding(txData)
263266
if err != nil {
264267
return nil, fmt.Errorf("failed to convert txData to RLP encoding: %w", err)

encoding/da.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ func convertTxDataToRLPEncoding(txData *types.TransactionData) ([]byte, error) {
255255
})
256256

257257
case types.L1MessageTxType: // L1MessageTxType is not supported
258+
fallthrough
258259
default:
259260
return nil, fmt.Errorf("unsupported tx type: %d", txData.Type)
260261
}
@@ -789,7 +790,7 @@ func MessageQueueV2ApplyL1MessagesFromBlocks(initialQueueHash common.Hash, block
789790
return rollingHash, nil
790791
}
791792

792-
func messageQueueV2ApplyL1Messages(initialQueueHash common.Hash, messages []*types.L1MessageTx) common.Hash {
793+
func MessageQueueV2ApplyL1Messages(initialQueueHash common.Hash, messages []*types.L1MessageTx) common.Hash {
793794
rollingHash := initialQueueHash
794795
for _, message := range messages {
795796
rollingHash = messageQueueV2ApplyL1Message(rollingHash, message)

0 commit comments

Comments
 (0)