Skip to content

Commit

Permalink
fix config error drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethanncnm committed Aug 2, 2023
1 parent 715ede3 commit 2dc46e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mt-batcher/mt_batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package mt_batcher

import (
"context"
"errors"
"strings"

"github.com/Layr-Labs/datalayr/common/logging"
Expand Down Expand Up @@ -179,9 +180,9 @@ func NewMantleBatch(cfg Config) (*MantleBatch, error) {
MinTimeoutRollupTxn: cfg.MinTimeoutRollupTxn,
RollupTimeout: cfg.RollupTimeout,
}
if cfg.MinTimeoutRollupTxn > cfg.RollUpMinTxn {
log.Error("new driver fail", "err", "MinTimeoutRollupTxn(%v)>RollUpMinTxn(%v)", cfg.MinTimeoutRollupTxn, cfg.RollUpMinTxn)
return nil, err
if cfg.MinTimeoutRollupTxn >= cfg.RollUpMinTxn {
log.Error("new driver fail", "err", "config value error : MinTimeoutRollupTxn should less than RollUpMinTxn MinTimeoutRollupTxn(%v)>RollUpMinTxn(%v)", cfg.MinTimeoutRollupTxn, cfg.RollUpMinTxn)
return nil, errors.New("config value error : MinTimeoutRollupTxn should less than RollUpMinTxn")
}
log.Info("hsm",
"enablehsm", driverConfig.EnableHsm, "hsmaddress", driverConfig.HsmAddress,
Expand Down

0 comments on commit 2dc46e9

Please sign in to comment.