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

AppentTag function usage error. append elements do not work #2643

Merged
merged 7 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.25.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update PENDING.md, not CHANGELOG.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, updated


*October 31st, 2018*

BUG FIXES
* [x/gov] \#2625](https://github.com/cosmos/cosmos-sdk/pull/2625) - fix bug: AppendTag function usage error


## 0.25.0

*October 24th, 2018*
Expand Down
12 changes: 6 additions & 6 deletions x/gov/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func handleMsgSubmitProposal(ctx sdk.Context, keeper Keeper, msg MsgSubmitPropos
)

if votingStarted {
resTags.AppendTag(tags.VotingPeriodStart, proposalIDBytes)
resTags = resTags.AppendTag(tags.VotingPeriodStart, proposalIDBytes)
}

return sdk.Result{
Expand All @@ -68,7 +68,7 @@ func handleMsgDeposit(ctx sdk.Context, keeper Keeper, msg MsgDeposit) sdk.Result
)

if votingStarted {
resTags.AppendTag(tags.VotingPeriodStart, proposalIDBytes)
resTags = resTags.AppendTag(tags.VotingPeriodStart, proposalIDBytes)
}

return sdk.Result{
Expand Down Expand Up @@ -111,8 +111,8 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) (resTags sdk.Tags) {

proposalIDBytes := keeper.cdc.MustMarshalBinaryBare(inactiveProposal.GetProposalID())
keeper.DeleteProposal(ctx, inactiveProposal)
resTags.AppendTag(tags.Action, tags.ActionProposalDropped)
resTags.AppendTag(tags.ProposalID, proposalIDBytes)
resTags = resTags.AppendTag(tags.Action, tags.ActionProposalDropped)
resTags = resTags.AppendTag(tags.ProposalID, proposalIDBytes)

logger.Info(
fmt.Sprintf("proposal %d (%s) didn't meet minimum deposit of %v steak (had only %v steak); deleted",
Expand Down Expand Up @@ -152,8 +152,8 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) (resTags sdk.Tags) {
logger.Info(fmt.Sprintf("proposal %d (%s) tallied; passed: %v",
activeProposal.GetProposalID(), activeProposal.GetTitle(), passes))

resTags.AppendTag(tags.Action, action)
resTags.AppendTag(tags.ProposalID, proposalIDBytes)
resTags = resTags.AppendTag(tags.Action, action)
resTags = resTags.AppendTag(tags.ProposalID, proposalIDBytes)
}

return resTags
Expand Down