-
Notifications
You must be signed in to change notification settings - Fork 203
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
Mx 15702 sovereign enable epochs handler #6626
base: feat/chain-go-sdk
Are you sure you want to change the base?
Mx 15702 sovereign enable epochs handler #6626
Conversation
This reverts commit 616fb58.
…nable-epochs-handler
…-handler' into MX-15702-sovereign-enable-epochs-handler
…s-handler # Conflicts: # genesis/process/sovereignGenesisBlockCreator.go
…s-handler # Conflicts: # factory/processing/processComponents.go # factory/processing/processComponents_test.go
@@ -23,26 +22,12 @@ func TestNewCoreComponentsFactory(t *testing.T) { | |||
require.NotNil(t, ccf) | |||
require.Nil(t, err) | |||
}) | |||
t.Run("nil genesis nodes setup factory, should return error", func(t *testing.T) { | |||
t.Run("nil run type core components, should return error", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need nil pointer checks for other subcomponents inside RunType
} | ||
if check.IfNil(args.EnableEpochsFactory) { | ||
return nil, enablers.ErrNilEnableEpochsFactory | ||
if check.IfNil(args.RunTypeCoreComponents) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to check those subcomps not to be nil.
@@ -239,6 +240,13 @@ func readConfigs(ctx *cli.Context, log logger.Logger) (*sovereignConfig.Sovereig | |||
} | |||
log.Debug("config", "file", sovereignExtraConfigPath) | |||
|
|||
configurationPaths.Epoch = ctx.GlobalString(epochConfigurationFile.Name) | |||
sovereignEpochConfig, err := sovereignConfig.LoadSovereignEpochConfig(configurationPaths.Epoch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add these?
These are already loaded within enableEpochs file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is different. It's loading SovereignEpochConfig struct, not the EpochConfig
@@ -15,3 +16,14 @@ func LoadSovereignGeneralConfig(filepath string) (*config.SovereignConfig, error | |||
|
|||
return cfg, nil | |||
} | |||
|
|||
// LoadSovereignEpochConfig returns the epoch config necessary by sovereign by reading it from the provided file | |||
func LoadSovereignEpochConfig(filepath string) (*config.SovereignEpochConfig, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this. These flags are already in an existing file that is being loaded anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is loading the SovereignEpochConfig struct
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/chain-go-sdk #6626 +/- ##
=====================================================
+ Coverage 77.68% 77.69% +0.01%
=====================================================
Files 928 963 +35
Lines 106315 108696 +2381
=====================================================
+ Hits 82593 84456 +1863
- Misses 18035 18416 +381
- Partials 5687 5824 +137 ☔ View full report in Codecov by Sentry. |
…s-handler # Conflicts: # factory/processing/processComponents.go # genesis/process/genesisBlockCreator.go # integrationTests/realcomponents/processorRunner.go # node/nodeRunner.go
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?