Commit 236b92e7 authored by Conner Fromknecht's avatar Conner Fromknecht

chore: prepare for iterative batch-tx size reduction

This commit places the batch sequencer tx size check inside of a for
loop so that the we can continue to whittle away batch tx sizes until
satisfying the configured maximum. This doesn't result in a behavioral
change, as the for loop exits after the first iteration. This is done to
make the behavioral changes more apparent in subsequent commits.
parent 6780c473
...@@ -166,6 +166,7 @@ func (d *Driver) SubmitBatchTx( ...@@ -166,6 +166,7 @@ func (d *Driver) SubmitBatchTx(
} }
shouldStartAt := start.Uint64() shouldStartAt := start.Uint64()
for {
batchParams, err := GenSequencerBatchParams( batchParams, err := GenSequencerBatchParams(
shouldStartAt, d.cfg.BlockOffset, batchElements, shouldStartAt, d.cfg.BlockOffset, batchElements,
) )
...@@ -205,4 +206,5 @@ func (d *Driver) SubmitBatchTx( ...@@ -205,4 +206,5 @@ func (d *Driver) SubmitBatchTx(
opts.GasPrice = gasPrice opts.GasPrice = gasPrice
return d.rawCtcContract.RawTransact(opts, batchCallData) return d.rawCtcContract.RawTransact(opts, batchCallData)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment