Skip to content

Commit

Permalink
Merge pull request ethereum-optimism#7934 from ethereum-optimism/jg/h…
Browse files Browse the repository at this point in the history
…ide_rethdb

op-node: Hide rethDB option
  • Loading branch information
trianglesphere authored Oct 30, 2023
2 parents 006ed38 + 3f3ad34 commit 0d93adc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions op-node/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var (
Usage: "The L1 RethDB path, used to fetch receipts for L1 blocks. Only applicable when using the `reth_db` RPC kind with `l1.rpckind`.",
EnvVars: prefixEnvVars("L1_RETHDB"),
Required: false,
Hidden: true,
}
L1RPCRateLimit = &cli.Float64Flag{
Name: "l1.rpc-rate-limit",
Expand Down
8 changes: 6 additions & 2 deletions op-service/sources/receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,13 @@ var RPCProviderKinds = []RPCProviderKind{
RPCKindBasic,
RPCKindAny,
RPCKindStandard,
RPCKindRethDB,
}

// Copy of RPCProviderKinds with RethDB added to all RethDB to be used but to hide it from the flags
var validRPCProviderKinds = func() []RPCProviderKind {
return append(RPCProviderKinds, RPCKindRethDB)
}()

func (kind RPCProviderKind) String() string {
return string(kind)
}
Expand All @@ -159,7 +163,7 @@ func (kind *RPCProviderKind) Clone() any {
}

func ValidRPCProviderKind(value RPCProviderKind) bool {
for _, k := range RPCProviderKinds {
for _, k := range validRPCProviderKinds {
if k == value {
return true
}
Expand Down

0 comments on commit 0d93adc

Please sign in to comment.