File tree 1 file changed +7
-1
lines changed
packages/taiko-client/driver/chain_syncer/blob/blocks_inserter
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,12 @@ func (i *BlocksInserterPacaya) InsertBlocks(
188
188
return fmt .Errorf ("failed to create TaikoAnchor.anchorV3 transaction: %w" , err )
189
189
}
190
190
191
+ // Get transactions in the block.
192
+ txs := types.Transactions {}
193
+ if txListCursor + int (blockInfo .NumTransactions ) > len (allTxs ) {
194
+ txs = allTxs [txListCursor : txListCursor + int (blockInfo .NumTransactions )]
195
+ }
196
+
191
197
// Decompress the transactions list and try to insert a new head block to L2 EE.
192
198
if lastPayloadData , err = createPayloadAndSetHead (
193
199
ctx ,
@@ -207,7 +213,7 @@ func (i *BlocksInserterPacaya) InsertBlocks(
207
213
L1BlockHeight : meta .GetRawBlockHeight (),
208
214
L1BlockHash : meta .GetRawBlockHash (),
209
215
},
210
- Txs : allTxs [ txListCursor : txListCursor + int ( blockInfo . NumTransactions )] ,
216
+ Txs : txs ,
211
217
Withdrawals : make ([]* types.Withdrawal , 0 ),
212
218
BaseFee : baseFee ,
213
219
},
You can’t perform that action at this time.
0 commit comments