Commit cbbb45ec authored by Paul Lange's avatar Paul Lange Committed by GitHub

op-node: Remove unused field in `ChannelBank` (#12001)

parent 22094b4d
...@@ -37,14 +37,13 @@ type ChannelBank struct { ...@@ -37,14 +37,13 @@ type ChannelBank struct {
channels map[ChannelID]*Channel // channels by ID channels map[ChannelID]*Channel // channels by ID
channelQueue []ChannelID // channels in FIFO order channelQueue []ChannelID // channels in FIFO order
prev NextFrameProvider prev NextFrameProvider
fetcher L1Fetcher
} }
var _ ResettableStage = (*ChannelBank)(nil) var _ ResettableStage = (*ChannelBank)(nil)
// NewChannelBank creates a ChannelBank, which should be Reset(origin) before use. // NewChannelBank creates a ChannelBank, which should be Reset(origin) before use.
func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextFrameProvider, fetcher L1Fetcher, m Metrics) *ChannelBank { func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextFrameProvider, m Metrics) *ChannelBank {
return &ChannelBank{ return &ChannelBank{
log: log, log: log,
spec: rollup.NewChainSpec(cfg), spec: rollup.NewChainSpec(cfg),
...@@ -52,7 +51,6 @@ func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextFrameProvider, ...@@ -52,7 +51,6 @@ func NewChannelBank(log log.Logger, cfg *rollup.Config, prev NextFrameProvider,
channels: make(map[ChannelID]*Channel), channels: make(map[ChannelID]*Channel),
channelQueue: make([]ChannelID, 0, 10), channelQueue: make([]ChannelID, 0, 10),
prev: prev, prev: prev,
fetcher: fetcher,
} }
} }
......
...@@ -102,7 +102,7 @@ func TestChannelBankSimple(t *testing.T) { ...@@ -102,7 +102,7 @@ func TestChannelBankSimple(t *testing.T) {
cfg := &rollup.Config{ChannelTimeoutBedrock: 10} cfg := &rollup.Config{ChannelTimeoutBedrock: 10}
cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, nil, metrics.NoopMetrics) cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, metrics.NoopMetrics)
// Load the first frame // Load the first frame
out, err := cb.NextData(context.Background()) out, err := cb.NextData(context.Background())
...@@ -146,7 +146,7 @@ func TestChannelBankInterleavedPreCanyon(t *testing.T) { ...@@ -146,7 +146,7 @@ func TestChannelBankInterleavedPreCanyon(t *testing.T) {
cfg := &rollup.Config{ChannelTimeoutBedrock: 10, CanyonTime: nil} cfg := &rollup.Config{ChannelTimeoutBedrock: 10, CanyonTime: nil}
cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, nil, metrics.NoopMetrics) cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, metrics.NoopMetrics)
// Load a:0 // Load a:0
out, err := cb.NextData(context.Background()) out, err := cb.NextData(context.Background())
...@@ -211,7 +211,7 @@ func TestChannelBankInterleaved(t *testing.T) { ...@@ -211,7 +211,7 @@ func TestChannelBankInterleaved(t *testing.T) {
ct := uint64(0) ct := uint64(0)
cfg := &rollup.Config{ChannelTimeoutBedrock: 10, CanyonTime: &ct} cfg := &rollup.Config{ChannelTimeoutBedrock: 10, CanyonTime: &ct}
cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, nil, metrics.NoopMetrics) cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, metrics.NoopMetrics)
// Load a:0 // Load a:0
out, err := cb.NextData(context.Background()) out, err := cb.NextData(context.Background())
...@@ -271,7 +271,7 @@ func TestChannelBankDuplicates(t *testing.T) { ...@@ -271,7 +271,7 @@ func TestChannelBankDuplicates(t *testing.T) {
cfg := &rollup.Config{ChannelTimeoutBedrock: 10} cfg := &rollup.Config{ChannelTimeoutBedrock: 10}
cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, nil, metrics.NoopMetrics) cb := NewChannelBank(testlog.Logger(t, log.LevelCrit), cfg, input, metrics.NoopMetrics)
// Load the first frame // Load the first frame
out, err := cb.NextData(context.Background()) out, err := cb.NextData(context.Background())
......
...@@ -84,7 +84,7 @@ func NewDerivationPipeline(log log.Logger, rollupCfg *rollup.Config, l1Fetcher L ...@@ -84,7 +84,7 @@ func NewDerivationPipeline(log log.Logger, rollupCfg *rollup.Config, l1Fetcher L
dataSrc := NewDataSourceFactory(log, rollupCfg, l1Fetcher, l1Blobs, altDA) // auxiliary stage for L1Retrieval dataSrc := NewDataSourceFactory(log, rollupCfg, l1Fetcher, l1Blobs, altDA) // auxiliary stage for L1Retrieval
l1Src := NewL1Retrieval(log, dataSrc, l1Traversal) l1Src := NewL1Retrieval(log, dataSrc, l1Traversal)
frameQueue := NewFrameQueue(log, l1Src) frameQueue := NewFrameQueue(log, l1Src)
bank := NewChannelBank(log, rollupCfg, frameQueue, l1Fetcher, metrics) bank := NewChannelBank(log, rollupCfg, frameQueue, metrics)
chInReader := NewChannelInReader(rollupCfg, log, bank, metrics) chInReader := NewChannelInReader(rollupCfg, log, bank, metrics)
batchQueue := NewBatchQueue(log, rollupCfg, chInReader, l2Source) batchQueue := NewBatchQueue(log, rollupCfg, chInReader, l2Source)
attrBuilder := NewFetchingAttributesBuilder(rollupCfg, l1Fetcher, l2Source) attrBuilder := NewFetchingAttributesBuilder(rollupCfg, l1Fetcher, l2Source)
......
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