-
Notifications
You must be signed in to change notification settings - Fork 324
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
build contract staking indexer only when staking protocol enabled #3886
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov Report
@@ Coverage Diff @@
## master #3886 +/- ##
==========================================
+ Coverage 75.38% 76.05% +0.67%
==========================================
Files 303 327 +24
Lines 25923 27855 +1932
==========================================
+ Hits 19541 21186 +1645
- Misses 5360 5578 +218
- Partials 1022 1091 +69
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -298,6 +298,9 @@ func (builder *Builder) buildSGDRegistry(forTest bool) error { | |||
} | |||
|
|||
func (builder *Builder) buildContractStakingIndexer(forTest bool) error { | |||
if !builder.cfg.Chain.EnableStakingProtocol { |
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.
will contractStakingIndexer
be nil
when enabled?
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.
in theory it could be, if cfg.Genesis.SystemStakingContractAddress == ""
in the config
in prod, the contract address is valid, and contractStakingIndexer
will be created
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.
should ContractStakingIndexer be built when cfg.Genesis.SystemStakingContractAddress == ""
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.
no, in that case, means SystemStaking (IIP-13)
is not enabled on the chain, no need to build the indexer
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Currently, the usage of the contract stake indexer is limited to the staking module. Therefore, if the staking protocol is not enabled, there is no need to create the indexer.
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: