Skip to content

Commit

Permalink
fix: cli args
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniFrenchBread committed Feb 2, 2024
1 parent a183eea commit 6843141
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion disperser/batcher/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Config struct {
// BatchSizeMBLimit is the maximum size of a batch in MB
BatchSizeMBLimit uint
MaxNumRetriesPerBlob uint
NumConfirmer uint
ConfirmerNum uint
}

type Batcher struct {
Expand Down
2 changes: 1 addition & 1 deletion disperser/cmd/batcher/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewConfig(ctx *cli.Context) Config {
BatchSizeMBLimit: ctx.GlobalUint(flags.BatchSizeLimitFlag.Name),
SRSOrder: ctx.GlobalInt(flags.SRSOrderFlag.Name),
MaxNumRetriesPerBlob: ctx.GlobalUint(flags.MaxNumRetriesPerBlobFlag.Name),
NumConfirmer: ctx.GlobalUint(flags.NumConfirmer.Name),
ConfirmerNum: ctx.GlobalUint(flags.ConfirmerNumFlag.Name),
},
TimeoutConfig: batcher.TimeoutConfig{
EncodingTimeout: ctx.GlobalDuration(flags.EncodingTimeoutFlag.Name),
Expand Down
7 changes: 4 additions & 3 deletions disperser/cmd/batcher/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ var (
EnvVar: common.PrefixEnvVar(envVarPrefix, "MAX_NUM_RETRIES_PER_BLOB"),
Value: 2,
}
NumConfirmer = cli.UintFlag{
Name: common.PrefixFlag(FlagPrefix, "num-confirmer"),
ConfirmerNumFlag = cli.UintFlag{
Name: common.PrefixFlag(FlagPrefix, "confirmer-num"),
Usage: "Number of confirmer go routines",
Required: false,
EnvVar: common.PrefixEnvVar(envVarPrefix, "NUM_CONFIRMER"),
EnvVar: common.PrefixEnvVar(envVarPrefix, "CONFIRMER_NUM"),
Value: 1,
}
// This flag is available so that we can manually adjust the number of chunks if desired for testing purposes or for other reasons.
Expand Down Expand Up @@ -155,6 +155,7 @@ var optionalFlags = []cli.Flag{
FinalizerIntervalFlag,
EncodingRequestQueueSizeFlag,
MaxNumRetriesPerBlobFlag,
ConfirmerNumFlag,
TargetNumChunksFlag,
}

Expand Down
2 changes: 1 addition & 1 deletion disperser/cmd/batcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func RunBatcher(ctx *cli.Context) error {
}

// confirmer
confirmer, err := batcher.NewConfirmer(config.EthClientConfig, config.StorageNodeConfig, queue, config.BatcherConfig.MaxNumRetriesPerBlob, config.BatcherConfig.NumConfirmer, logger, metrics)
confirmer, err := batcher.NewConfirmer(config.EthClientConfig, config.StorageNodeConfig, queue, config.BatcherConfig.MaxNumRetriesPerBlob, config.BatcherConfig.ConfirmerNum, logger, metrics)
if err != nil {
return err
}
Expand Down

0 comments on commit 6843141

Please sign in to comment.