Skip to content

Commit

Permalink
Merge pull request #7944 from ethereum-optimism/fix-batcher-flake
Browse files Browse the repository at this point in the history
op-batcher: fix test RNG data flake
  • Loading branch information
sebastianst authored Oct 30, 2023
2 parents 0d93adc + a51fd20 commit 19fc020
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion op-batcher/batcher/channel_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ func ChannelManagerCloseNoPendingChannel(t *testing.T, batchType uint) {
// new channel frames after this point.
func ChannelManagerClosePendingChannel(t *testing.T, batchType uint) {
require := require.New(t)
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
// The number of batch txs depends on compression of the random data, hence the static test RNG seed.
// Example of different RNG seed that creates less than 2 frames: 1698700588902821588
rng := rand.New(rand.NewSource(123))
log := testlog.Logger(t, log.LvlCrit)
m := NewChannelManager(log, metrics.NoopMetrics,
ChannelConfig{
Expand Down

0 comments on commit 19fc020

Please sign in to comment.