-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
refactor(x/staking)!: KVStoreService, return errors and use context.Context (backport #16324) #16598
refactor(x/staking)!: KVStoreService, return errors and use context.Context (backport #16324) #16598
Conversation
…ontext (#16324) Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> (cherry picked from commit 1be7d98) # Conflicts: # CHANGELOG.md # x/distribution/keeper/delegation.go # x/distribution/keeper/hooks.go # x/evidence/go.mod # x/evidence/go.sum # x/staking/migrations/v2/store.go # x/staking/simulation/operations_test.go # x/staking/types/errors.go
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) | ||
|
||
k.TrackHistoricalInfo(ctx) | ||
return k.TrackHistoricalInfo(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
} | ||
|
||
// Called every block, update validator set | ||
func (k *Keeper) EndBlocker(ctx context.Context) ([]abci.ValidatorUpdate, error) { | ||
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) | ||
|
||
return k.BlockValidatorUpdates(sdk.UnwrapSDKContext(ctx)), nil | ||
return k.BlockValidatorUpdates(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
|
||
am.keeper.BeginBlocker(c) | ||
return nil | ||
return am.keeper.BeginBlocker(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
@@ -26,12 +26,19 @@ | |||
} | |||
|
|||
// recalculate inflation rate | |||
totalStakingSupply := k.StakingTokenSupply(ctx) | |||
bondedRatio := k.BondedRatio(ctx) | |||
totalStakingSupply, err := k.StakingTokenSupply(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
return err | ||
} | ||
|
||
bondedRatio, err := k.BondedRatio(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Evidence tests are failing because of the version of the SDK. Should I update it to match this PR? |
This is an automatic backport of pull request #16324 done by Mergify.
Cherry-pick of 1be7d98 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com