Skip to content

Commit

Permalink
Remove the LoopIntervalMsec from liveness_expiration + withdrawals_…
Browse files Browse the repository at this point in the history
…mon. (#50)

* remove: `LoopIntervalMsec` from withdrawals_mon.

* remove: `LoopIntervalMsec` useless logic from LivenessExpiration.
  • Loading branch information
Ethnical authored Aug 14, 2024
1 parent 54f0c69 commit 8a555f0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions op-monitorism/liveness_expiration/cli.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package liveness_expiration

import (
"errors"
"github.com/ethereum/go-ethereum/common"

opservice "github.com/ethereum-optimism/optimism/op-service"
Expand All @@ -17,13 +16,11 @@ const (
SafeAddressFlagName = "safe.address"
LivenessModuleAddressFlagName = "livenessmodule.address"
LivenessGuardAddressFlagName = "livenessguard.address"
LoopIntervalMsecFlagName = "loop.interval.msec"
)

type CLIConfig struct {
L1NodeURL string
EventBlockRange uint64
LoopIntervalMsec uint64
StartingL1BlockHeight uint64

LivenessModuleAddress common.Address
Expand All @@ -36,16 +33,11 @@ func ReadCLIFlags(ctx *cli.Context) (CLIConfig, error) {
L1NodeURL: ctx.String(L1NodeURLFlagName),
EventBlockRange: ctx.Uint64(EventBlockRangeFlagName),
StartingL1BlockHeight: ctx.Uint64(StartingL1BlockHeightFlagName),
LoopIntervalMsec: ctx.Uint64(LoopIntervalMsecFlagName),
SafeAddress: common.HexToAddress(ctx.String(SafeAddressFlagName)),
LivenessModuleAddress: common.HexToAddress(ctx.String(LivenessModuleAddressFlagName)),
LivenessGuardAddress: common.HexToAddress(ctx.String(LivenessGuardAddressFlagName)),
}

if cfg.LoopIntervalMsec == 0 {
return cfg, errors.New("no loop interval configured")
}

return cfg, nil
}

Expand Down
1 change: 0 additions & 1 deletion op-monitorism/liveness_expiration/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func NewMonitor(ctx context.Context, log log.Logger, m metrics.Factory, cfg CLIC
log.Info("", "Safe Address", cfg.SafeAddress)
log.Info("", "LivenessModuleAddress", cfg.LivenessModuleAddress)
log.Info("", "LivenessGuardAddress", cfg.LivenessGuardAddress)
log.Info("", "Interval", cfg.LoopIntervalMsec)
log.Info("", "L1RpcUrl", cfg.L1NodeURL)
log.Info("--------------------------- End of Infos -------------------------------------------------------")

Expand Down
1 change: 0 additions & 1 deletion op-monitorism/withdrawals/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type CLIConfig struct {
L2NodeURL string

EventBlockRange uint64
LoopIntervalMsec uint64
StartingL1BlockHeight uint64

OptimismPortalAddress common.Address
Expand Down

0 comments on commit 8a555f0

Please sign in to comment.