Skip to content

Commit

Permalink
Revert "fix(x/gov): Return ErrInvalidProposalContent in SubmitProposa…
Browse files Browse the repository at this point in the history
…l when legacy handler returns an error. (backport cosmos#13051) (cosmos#15667)"

This reverts commit f89d955.

Update CHANGELOG.md

changelog
  • Loading branch information
yihuang committed May 30, 2023
1 parent 5cd0b23 commit 0a93ffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

* (x/gov) [#16331](https://github.com/cosmos/cosmos-sdk/pull/16331) Revert a change that breaks result hash.

## [v0.46.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.12) - 2022-04-04

### Features
Expand Down
6 changes: 1 addition & 5 deletions x/gov/keeper/proposal.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper

import (
"errors"
"fmt"

"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -55,10 +54,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat
if msg, ok := msg.(*v1.MsgExecLegacyContent); ok {
cacheCtx, _ := ctx.CacheContext()
if _, err := handler(cacheCtx, msg); err != nil {
if errors.Is(types.ErrNoProposalHandlerExists, err) {
return v1.Proposal{}, err
}
return v1.Proposal{}, sdkerrors.Wrap(types.ErrInvalidProposalContent, err.Error())
return v1.Proposal{}, sdkerrors.Wrap(types.ErrNoProposalHandlerExists, err.Error())
}
}

Expand Down

0 comments on commit 0a93ffb

Please sign in to comment.