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

AppendTags usage issue in x/staking/handler.go #4273

Closed
4 tasks
cryptophonic opened this issue May 5, 2019 · 0 comments · Fixed by #4336
Closed
4 tasks

AppendTags usage issue in x/staking/handler.go #4273

cryptophonic opened this issue May 5, 2019 · 0 comments · Fixed by #4336

Comments

@cryptophonic
Copy link

Summary of Bug

Mark [12:06 PM]
in x/staking/handler.go there are a couple sections of code that looks like:

           resTags.AppendTags(sdk.NewTags(
                   tags.Action, tags.ActionCompleteUnbonding,
                   tags.Delegator, dvPair.DelegatorAddress.String(),
                   tags.SrcValidator, dvPair.ValidatorAddress.String(),
           ))

this code will have no effect on resTags itself because AppendTags() returns its result and does not modify its base object. Should be:

           resTags = resTags.AppendTags(sdk.NewTags(
                   tags.Action, tags.ActionCompleteUnbonding,
                   tags.Delegator, dvPair.DelegatorAddress.String(),
                   tags.SrcValidator, dvPair.ValidatorAddress.String(),
           ))

Zaki Manian [12:08 PM]
yes that's a bug
Make a PR?

Mark[12:08 PM]
yup will do

Version

Latest SDK code - master branch

Steps to Reproduce

N/A code review produce the issue, confirmed with Zaki


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
alessio pushed a commit that referenced this issue May 14, 2019
Fix AppendTags usage error

Thanks: @mjackson001 for the bug report and patch (original PR: #4274)
Closes: #4273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant