Commit 3f3ad34e authored by Joshua Gutow's avatar Joshua Gutow

op-node: Hide rethDB option

If the rethDB option is used without the proper build configuration,
the op-node will panic. Note that we do not have this build configuration
in our releases. This hides the option to use it, but does not fully
remove it. There was some duplication required to easily hide the
command line flag while still being able to use it for testing purposes.

This commit should be reverted when rethDB is stable.
parent c3efa312
...@@ -87,6 +87,7 @@ var ( ...@@ -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`.", 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"), EnvVars: prefixEnvVars("L1_RETHDB"),
Required: false, Required: false,
Hidden: true,
} }
L1RPCRateLimit = &cli.Float64Flag{ L1RPCRateLimit = &cli.Float64Flag{
Name: "l1.rpc-rate-limit", Name: "l1.rpc-rate-limit",
......
...@@ -138,9 +138,13 @@ var RPCProviderKinds = []RPCProviderKind{ ...@@ -138,9 +138,13 @@ var RPCProviderKinds = []RPCProviderKind{
RPCKindBasic, RPCKindBasic,
RPCKindAny, RPCKindAny,
RPCKindStandard, 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 { func (kind RPCProviderKind) String() string {
return string(kind) return string(kind)
} }
...@@ -159,7 +163,7 @@ func (kind *RPCProviderKind) Clone() any { ...@@ -159,7 +163,7 @@ func (kind *RPCProviderKind) Clone() any {
} }
func ValidRPCProviderKind(value RPCProviderKind) bool { func ValidRPCProviderKind(value RPCProviderKind) bool {
for _, k := range RPCProviderKinds { for _, k := range validRPCProviderKinds {
if k == value { if k == value {
return true return true
} }
......
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