fix parse config.toml #414
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors how the transaction details storage provider is configured and accessed throughout the codebase. The main change is to move the
tx_details_storage_providerfield from specific sub-configs (likeTxIndexerConfigandCommonGeneralTxIndexerConfig) to the top-level general configuration, ensuring consistent access and simplifying configuration management. The environment variable handling and default config files have also been updated to reflect this change.Configuration refactoring:
tx_details_storage_providerfield fromCommonGeneralTxIndexerConfigandTxIndexerConfigtoCommonGeneralConfigandGeneralRpcServerConfig, making it a top-level field in the general configuration. This change ensures a single source of truth for the storage provider setting. [1] [2] [3] [4]tx_details_storage_providerfield to usedeserialize_data_or_env, allowing it to be set via environment variables more consistently.Default configuration and environment variables:
tx_details_storage_providerto the default environment configuration file, documenting available options and the default value. Removed redundant or outdated configuration lines from sub-config sections. [1] [2]Code usage updates:
tx_details_storage_providerin the codebase to use the new location in the general configuration, including inServerContextand thetx-indexermain function. [1] [2]Code cleanup:
tx_details_storage_providerfrom sub-configs and constructors. [1] [2] [3] [4]