Skip to content
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

Include Amount in Complete Unbonding/Redelegation Events #5597

Merged
merged 6 commits into from
Jan 31, 2020

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Jan 31, 2020

Description

Include total unbonding and redelegation balances in events.

closes: #5564


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

// CompleteUnbondingWithAmount completes the unbonding of all mature entries in
// the retrieved unbonding delegation object and returns the total unbonding
// balance or an error upon failure.
func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing a new function instead of replacing the old as we want to get this into the next 0.37 and 0.38 point releases.

@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #5597 into master will increase coverage by 0.01%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5597      +/-   ##
==========================================
+ Coverage   53.39%   53.41%   +0.01%     
==========================================
  Files         322      322              
  Lines       19724    19745      +21     
==========================================
+ Hits        10532    10547      +15     
- Misses       8375     8381       +6     
  Partials      817      817
Impacted Files Coverage Δ
x/staking/keeper/val_state_change.go 65.03% <0%> (-2.49%) ⬇️
x/staking/keeper/delegation.go 74.66% <87.5%> (+0.88%) ⬆️

// CompleteRedelegation completes the redelegations of all mature entries in the
// retrieved redelegation object and returns the total redelegation (initial)
// balance or an error upon failure.
func (k Keeper) CompleteRedelegationWithAmount(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing a new function instead of replacing the old as we want to get this into the next 0.37 and 0.38 point releases.

@alexanderbez alexanderbez added R4R and removed WIP labels Jan 31, 2020
@alexanderbez alexanderbez marked this pull request as ready for review January 31, 2020 15:50
This was referenced Jan 31, 2020
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

x/staking/keeper/delegation.go Outdated Show resolved Hide resolved
x/staking/keeper/delegation.go Outdated Show resolved Hide resolved
@alexanderbez alexanderbez merged commit ce16e0a into master Jan 31, 2020
@alexanderbez alexanderbez deleted the bez/5564-include-amt-events branch January 31, 2020 16:12
cwgoes added a commit that referenced this pull request Feb 3, 2020
* Simulation docs (#5033)

* simulation docs

* update docs with the latest simulation changes

* minor imporvments

* clean up of simulation.md

* expand section on weights

* minor reword

* minor wording fix

Co-authored-by: Marko <[email protected]>

* Merge PR #5597: Include Amount in Complete Unbonding/Redelegation Events

* Add bank alias for gaia

* Moar bank alias gaia

* Moar bank alias gaia

* Call `TimeoutExecuted`, add wrappers

* Remove unused `MsgRecvPacket`

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Alexander Bezobchuk <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
fedekunze added a commit that referenced this pull request Feb 20, 2020
* Add comments, remove unused code and attempt to point to places where the spec is being implemented

* close channel when transfer fails

* rename packer data transfer to align to spec; refactor table tests

* ICS 20 implementation cleanup work (#5602)

* Simulation docs (#5033)

* simulation docs

* update docs with the latest simulation changes

* minor imporvments

* clean up of simulation.md

* expand section on weights

* minor reword

* minor wording fix

Co-authored-by: Marko <[email protected]>

* Merge PR #5597: Include Amount in Complete Unbonding/Redelegation Events

* Add bank alias for gaia

* Moar bank alias gaia

* Moar bank alias gaia

* Call `TimeoutExecuted`, add wrappers

* Remove unused `MsgRecvPacket`

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Alexander Bezobchuk <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>

* Merge PR #5603: Remove acknowledgement interface in favour of []byte

* fixes and cleanup

* spec compliance

* refactor relay prefixes and tests

* Fix test compilation

* cleanup; add notes and additional test case

* Receive transfer test

* Apply suggestions from code review

Co-Authored-By: Bot from GolangCI <[email protected]>

* Fix autolinter application

* Add testcase with incorrect prefix

* golangcibot fixes

* delete extra comment

Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: Christopher Goes <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Alexander Bezobchuk <[email protected]>
Co-authored-by: Bot from GolangCI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Amount in Unbonding/Redelegation Completion Events
2 participants