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