iotex-core
iotex-core copied to clipboard
Move config definition into corresponding components
Right now, most of the configs of different components are defined in config/config.go, and config is used in different components. As a result, the dependency is very complex that loop dependency is a common problem.
What would you like to be added: Move config definitions into corresponding components.
Why is this needed: Independent component
Example 1: https://github.com/iotexproject/iotex-core/pull/2673 Example 2: https://github.com/iotexproject/iotex-core/pull/2695
https://iotex.larksuite.com/docs/docusUF0iZ9n3JF4CamxsQAfCLe#
create 1 PR for moving each struct, like Consensus struct {}, BlockSync struct {}
All unmoved config definitions in config.go directly or indirectly import action package. However, if the config structs in config.go are moved to their responding package, there will be a loop dependency. Because action package needs to read ChainID in config package.
Dependency would be decoupled after the pr https://github.com/iotexproject/iotex-core/pull/3035 is merged
has been split into #3739 #3736 #3735 #3721