cosmos-sdk/x/staking/keeper
mergify[bot] ac970f52be
feat: add (re)delegation getters (backport #11596) (#11615)
* feat: add (re)delegation getters (#11596)

### Description

This PR adds general helper functions to the `x/staking` module that are used in the Evmos `x/vesting` module and originated from Agoric's custom staking module implementation https://github.com/agoric-labs/cosmos-sdk/blob/4085-true-vesting/x/staking/keeper/delegation.go.

- `GetDelegatorUnbonding`
- `GetDelegatorBonded`
- `IterateDelegatorUnbondingDelegations`
- `IterateDelegatorDelegations`
- `IterateDelegatorRedelegations`

(cherry picked from commit b8270fc9ba)

# Conflicts:
#	CHANGELOG.md
#	x/staking/keeper/delegation.go

* fix RemoveDelegation method conflict

* fix CHANGELOG conflict

* add new PR in CHANGELOG

Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
2022-04-13 16:34:42 +02:00
..
alias_functions.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
common_test.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
delegation.go feat: add (re)delegation getters (backport #11596) (#11615) 2022-04-13 16:34:42 +02:00
delegation_test.go feat: add (re)delegation getters (backport #11596) (#11615) 2022-04-13 16:34:42 +02:00
grpc_query.go fix: Staking delegations should return empty list instead of rpc error when no records found (#9423) 2021-06-01 15:17:44 +00:00
grpc_query_test.go fix: Staking delegations should return empty list instead of rpc error when no records found (#9423) 2021-06-01 15:17:44 +00:00
historical_info.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
historical_info_test.go Less function to not use default power reduction 2021-02-02 13:12:05 +10:00
hooks.go Merge PR #4417: cleanup staking references from types pkg 2019-06-04 15:06:58 -07:00
invariants.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
keeper.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
keeper_test.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
migrations.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
msg_server.go fix: fixed missing coin denomination in msg server logs (backport #9786) (#9844) 2021-08-04 11:54:28 +02:00
params.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
pool.go Index supply by denom (#8517) 2021-03-03 09:58:16 +00:00
power_reduction.go on-chain power reduction param conversion basic work 2021-01-27 20:24:00 +10:00
power_reduction_test.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
querier.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
querier_test.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
query_utils.go various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
slash.go use on-chain params on tests + fix tests + add new tests for power reduction change 2021-01-28 23:54:39 +10:00
slash_test.go SDK Core Audit - simapp updates (#9315) 2021-05-17 15:42:44 +00:00
test_common.go Use any as validator pubkey (#7597) 2020-10-23 12:07:52 +00:00
val_state_change.go revert: Turn staking power reduction into an on-chain param (#9495) 2021-06-14 14:45:15 +00:00
validator.go codec: Rename codec and marshaler interfaces (#9226) 2021-04-29 10:46:22 +00:00
validator_bench_test.go Removed GetValidator caching to fix concurrency error (#8546) 2021-02-12 11:52:03 +00:00
validator_test.go SDK Core Audit - simapp updates (#9315) 2021-05-17 15:42:44 +00:00