Commit c62ab3ea authored by Michael de Hoog's avatar Michael de Hoog

Cleanup

parent 461b2134
......@@ -102,11 +102,11 @@ func (cc *ChannelConfig) NewCompressor() (derive.Compressor, error) {
switch cc.CompressorKind {
case flags.CompressorShadow:
return NewShadowCompressor(
cc.MaxFrameSize, // subtract 1 byte for version
cc.MaxFrameSize,
)
default:
return NewTargetSizeCompressor(
cc.TargetFrameSize, // subtract 1 byte for version
cc.TargetFrameSize,
cc.TargetNumFrames,
cc.ApproxComprRatio,
)
......
......@@ -99,6 +99,7 @@ func TestChannelManagerReturnsErrReorgWhenDrained(t *testing.T) {
m := NewChannelManager(log, metrics.NoopMetrics,
ChannelConfig{
TargetFrameSize: 1,
TargetNumFrames: 1,
MaxFrameSize: 120_000,
ApproxComprRatio: 1.0,
})
......@@ -172,6 +173,7 @@ func TestChannelManager_Clear(t *testing.T) {
// be able to output any frames
MaxFrameSize: 24,
TargetFrameSize: 24,
TargetNumFrames: 1,
ApproxComprRatio: 1.0,
})
......@@ -332,6 +334,7 @@ func TestChannelManager_TxResend(t *testing.T) {
m := NewChannelManager(log, metrics.NoopMetrics,
ChannelConfig{
TargetFrameSize: 1,
TargetNumFrames: 1,
MaxFrameSize: 120_000,
ApproxComprRatio: 1.0,
})
......@@ -398,6 +401,7 @@ func TestChannelManagerCloseNoPendingChannel(t *testing.T) {
m := NewChannelManager(log, metrics.NoopMetrics,
ChannelConfig{
TargetFrameSize: 1,
TargetNumFrames: 1,
MaxFrameSize: 100,
ApproxComprRatio: 1.0,
ChannelTimeout: 1000,
......
package batcher_test
import (
"github.com/ethereum-optimism/optimism/op-batcher/flags"
"math"
"testing"
"github.com/ethereum-optimism/optimism/op-batcher/batcher"
"github.com/ethereum-optimism/optimism/op-batcher/flags"
"github.com/stretchr/testify/require"
)
......
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