Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PRT - Remove unused flag #1815

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions protocol/chainlib/chain_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,11 @@ func newChainRouter(ctx context.Context, nConns uint, rpcProviderEndpoint lavase
}
}
if hasSubscriptionInSpec && apiCollection.Enabled && !webSocketSupported {
err := utils.LavaFormatError("subscriptions are applicable for this chain, but websocket is not provided in 'supported' map. By not setting ws/wss your provider wont be able to accept ws subscriptions, therefore might receive less rewards and lower QOS score.", nil,
return nil, utils.LavaFormatError("subscriptions are applicable for this chain, but websocket is not provided in 'supported' map. By not setting ws/wss your provider wont be able to accept ws subscriptions, therefore might receive less rewards and lower QOS score.", nil,
utils.LogAttr("apiInterface", apiCollection.CollectionData.ApiInterface),
utils.LogAttr("supportedMap", supportedMap),
utils.LogAttr("required", WebSocketExtension),
)
if !IgnoreSubscriptionNotConfiguredError {
return nil, err
}
}

utils.LavaFormatDebug("router keys", utils.LogAttr("chainProxyRouter", chainProxyRouter))
Expand Down
8 changes: 0 additions & 8 deletions protocol/chainlib/chain_router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ func TestChainRouterWithDisabledWebSocketInSpec(t *testing.T) {
chainParser, err := NewChainParser(apiInterface)
require.NoError(t, err)

IgnoreSubscriptionNotConfiguredError = false

addonsOptions := []string{"-addon-", "-addon2-"}
extensionsOptions := []string{"-test-", "-test2-", "-test3-"}

Expand Down Expand Up @@ -400,8 +398,6 @@ func TestChainRouterWithEnabledWebSocketInSpec(t *testing.T) {
chainParser, err := NewChainParser(apiInterface)
require.NoError(t, err)

IgnoreSubscriptionNotConfiguredError = false

addonsOptions := []string{"-addon-", "-addon2-"}
extensionsOptions := []string{"-test-", "-test2-", "-test3-"}

Expand Down Expand Up @@ -795,8 +791,6 @@ func TestChainRouterWithMethodRoutes(t *testing.T) {
chainParser, err := NewChainParser(apiInterface)
require.NoError(t, err)

IgnoreSubscriptionNotConfiguredError = false

addonsOptions := []string{"-addon-", "-addon2-"}
extensionsOptions := []string{"-test-", "-test2-", "-test3-"}

Expand Down Expand Up @@ -2181,8 +2175,6 @@ func TestChainRouterWithInternalPaths(t *testing.T) {
chainParser, err := NewChainParser(play.apiInterface)
require.NoError(t, err)

IgnoreSubscriptionNotConfiguredError = false

spec := testcommon.CreateMockSpec()
spec.ApiCollections = play.specApiCollections
chainParser.SetSpec(spec)
Expand Down
5 changes: 0 additions & 5 deletions protocol/chainlib/chainlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ const (
INTERNAL_ADDRESS = "internal-addr"
)

var (
IgnoreSubscriptionNotConfiguredError = true
IgnoreSubscriptionNotConfiguredErrorFlag = "ignore-subscription-not-configured-error"
)

func NewChainParser(apiInterface string) (chainParser ChainParser, err error) {
switch apiInterface {
case spectypes.APIInterfaceJsonRPC:
Expand Down
1 change: 0 additions & 1 deletion protocol/rpcprovider/rpcprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ rpcprovider 127.0.0.1:3333 OSMOSIS tendermintrpc "wss://www.node-path.com:80,htt
cmdRPCProvider.Flags().Duration(common.RelayHealthIntervalFlag, RelayHealthIntervalFlagDefault, "interval between relay health checks")
cmdRPCProvider.Flags().String(HealthCheckURLPathFlagName, HealthCheckURLPathFlagDefault, "the url path for the provider's grpc health check")
cmdRPCProvider.Flags().DurationVar(&updaters.TimeOutForFetchingLavaBlocks, common.TimeOutForFetchingLavaBlocksFlag, time.Second*5, "setting the timeout for fetching lava blocks")
cmdRPCProvider.Flags().BoolVar(&chainlib.IgnoreSubscriptionNotConfiguredError, chainlib.IgnoreSubscriptionNotConfiguredErrorFlag, chainlib.IgnoreSubscriptionNotConfiguredError, "ignore webSocket node url not configured error, when subscription is enabled in spec")
cmdRPCProvider.Flags().IntVar(&numberOfRetriesAllowedOnNodeErrors, common.SetRelayCountOnNodeErrorFlag, 2, "set the number of retries attempt on node errors")
cmdRPCProvider.Flags().String(common.UseStaticSpecFlag, "", "load offline spec provided path to spec file, used to test specs before they are proposed on chain, example for spec with inheritance: --use-static-spec ./cookbook/specs/ibc.json,./cookbook/specs/tendermint.json,./cookbook/specs/cosmossdk.json,./cookbook/specs/ethermint.json,./cookbook/specs/ethereum.json,./cookbook/specs/evmos.json")
cmdRPCProvider.Flags().Uint64(common.RateLimitRequestPerSecondFlag, 0, "Measuring the load relative to this number for feedback - per second - per chain - default unlimited. Given Y simultaneous relay calls, a value of X and will measure Y/X load rate.")
Expand Down
Loading