Commit 564b0c17 authored by zhiqiangxu's avatar zhiqiangxu Committed by GitHub

NewChannelBuilder => newChannelBuilder, and move it into channel_builder_test.go (#13148)

parent 25972bd8
......@@ -88,18 +88,6 @@ type ChannelBuilder struct {
outputBytes int
}
// NewChannelBuilder creates a new channel builder or returns an error if the
// channel out could not be created.
// it acts as a factory for either a span or singular channel out
func NewChannelBuilder(cfg ChannelConfig, rollupCfg *rollup.Config, latestL1OriginBlockNum uint64) (*ChannelBuilder, error) {
co, err := NewChannelOut(cfg, rollupCfg)
if err != nil {
return nil, fmt.Errorf("creating channel out: %w", err)
}
return NewChannelBuilderWithChannelOut(cfg, rollupCfg, latestL1OriginBlockNum, co), nil
}
func NewChannelBuilderWithChannelOut(cfg ChannelConfig, rollupCfg *rollup.Config, latestL1OriginBlockNum uint64, channelOut derive.ChannelOut) *ChannelBuilder {
cb := &ChannelBuilder{
cfg: cfg,
......
This diff is collapsed.
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