Skip to content

Commit

Permalink
Port sdk v0.39.1 (cosmos#39)
Browse files Browse the repository at this point in the history
* v0.38.4-RC1

* add release date

* client/keys/parse: honor config changes (cosmos#6340)

`keys parse` uses the global configuration before
before client applications have had a chance to
apply their settings.

This change adds a `GetSealedConfig()` helper
that waits for the config to be sealed before
returning it.

Fixes: cosmos#5091
Origin: cosmos@4e328d7
Author: Adam Bozanich <adam.boz@gmail.com>
Reviewed-by: Alessio Treglia <alessio@tendermint.com>

* Merge PR cosmos#6505: Backport v0.38.5: IAVL Bump (RC) & Pruning Refactor

* Fix cl

* Fix cl

* Merge PR cosmos#6551: Ethanfrey/fix trace flag

* Merge PR cosmos#6552: Add sender info to bank transfer event

* Merge PR cosmos#6581: v0.38.5-RC1

* Add release date

* deps: bump IAVL to 0.14

* cl++

* Merge PR cosmos#6618: backport 0.39.0 (launchpad): cherry pick cosmos#5839

* launchpad: bump tendermint to v0.33.6 (cosmos#6673)

* launchpad: bump tendermint to v0.33.6

* cha-cha-cha

* fix types.ChainAnteDecorators() panic (cosmos#5742) (cosmos#6669)

ChainAnteDecorators() panics when no arguments are supplied.
This change its behaviour and the function now returns a nil
AnteHandler in case no AnteDecorator instances are supplied.

Closes: cosmos#5741

* launchpad: register MsgFundCommunityPool to distribution codec (cosmos#6675)

Closes: cosmos#6210

* client: backport IBC additions (cosmos#6682)

* launchpad: backport cliCtx.QueryABCI

* add prove flag

* Save account for multi sending (cosmos#6674)

Include changes from PR cosmos#6283

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>

* baseapp: fix sender events accumulation (cosmos#6683)

closes: cosmos#6306
original PR: cosmos#6307

* run go mod tidy

* add changelog line re: issue that was not included in v0.38.5

* Fix changelog

* add release notes

* update CODEOWNERS as per STABLE_RELEASES.md

Launchpad's Stable Release Managers team's current composition as
approved by @okwme (ICF):

* @alessio
* @clevinson
* @ethanfrey

* Add milestone's URL

* Revert "update CODEOWNERS as per STABLE_RELEASES.md"

This reverts commit f384592.

* fix typo

* add example patch

* launchpad: backport account sequence stuck (cosmos#6721)

Launchpad fix for cosmos#6287

* update release notes

* make explicit that the regression is fixed in 0.39

* update release notes

* Update CHANGELOG.md

* update release notes

@ethanfrey

* remove pruning info from changelog

They have been moved to NEWS.md

* Update NEWS.md

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* Mege PR cosmos#6749: auth: remove custom JSON marshaling

* mv NEWS.md -> RELEASE_NOTES.md

Self-explanatory naming convention.

* Update changelog

* add reference to gaia software upgrade

* x/staking: add call to iterator Close() method (cosmos#6794)

Original pull request: cosmos#6791

* [ci] fix linter (cosmos#6795)

* Merge PR cosmos#6842: Remove custom acc JSON marshl

* Backport cosmos#5671: Add a Flag for CORS (cosmos#6853)

This adds the --unsafe-cors flag functionality.

From: cosmos#5671
Co-authored-by: Marko <marbar3778@yahoo.com>

* Merge PR cosmos#6855: Allow passing through Content-Type (needed for POST)

* Merge PR cosmos#6861: Revert "Backport 0.39.1: Remove Custom JSON Marshaling for Accounts"

* Merge PR cosmos#6869: Backport 0.39.1: Launchpad Migration cosmos#6829

* Update changelog and release notes

* Update x/auth/legacy/v0_39/types.go

* Update x/auth/legacy/v0_38/types.go

* Merge PR cosmos#6938: Fix v0.39 migrate test

* Merge PR cosmos#6937: Bump Tendermint to v0.33.7

* Update x/auth/legacy/v0_39/types.go

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* update RELEASE_NOTES.md

* update changelog

* test case with real genesis data (cosmos#6995)

* incorporate Ethan Frey's suggestion

* make format

* Update go mod

* Remove some ci files

* Modify data for test

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
8 people authored Aug 26, 2020
1 parent 77ec740 commit c2c8529
Show file tree
Hide file tree
Showing 107 changed files with 2,322 additions and 951 deletions.
61 changes: 58 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,61 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [Unreleased]
## [v0.39.1]

* (x/auth) [\#6861](https://github.com/cosmos/cosmos-sdk/pull/6861) Remove public key Bech32 encoding for all account types for JSON serialization, instead relying on direct Amino encoding. In addition, JSON serialization utilizes Amino instead of the Go stdlib, so integers are treated as strings.
* (client) [\#6853](https://github.com/cosmos/cosmos-sdk/pull/6853) Add --unsafe-cors flag.

## [v0.39.0]

### Improvements

* (deps) Bump Tendermint version to [v0.33.6](https://github.com/tendermint/tendermint/releases/tag/v0.33.6)
* (deps) Bump IAVL version to [v0.14.0](https://github.com/cosmos/iavl/releases/tag/v0.14.0)
* (client) [\#5585](https://github.com/cosmos/cosmos-sdk/pull/5585) `CLIContext` additions:
* Introduce `QueryABCI` that returns the full `abci.ResponseQuery` with inclusion Merkle proofs.
* Added `prove` flag for Merkle proof verification.
* (x/staking) [\#6791)](https://github.com/cosmos/cosmos-sdk/pull/6791) Close {UBDQueue,RedelegationQueu}Iterator once used.

### API Breaking Changes

* (baseapp) [\#5837](https://github.com/cosmos/cosmos-sdk/issues/5837) Transaction simulation now returns a `SimulationResponse` which contains the `GasInfo` and `Result` from the execution.

### Client Breaking Changes

* (x/auth) [\#6745](https://github.com/cosmos/cosmos-sdk/issues/6745) Remove BaseAccount's custom JSON {,un}marshalling.

### Bug Fixes

* (store) [\#6475](https://github.com/cosmos/cosmos-sdk/pull/6475) Revert IAVL pruning functionality introduced in
[v0.13.0](https://github.com/cosmos/iavl/releases/tag/v0.13.0),
where the IAVL no longer keeps states in-memory in which it flushes periodically. IAVL now commits and
flushes every state to disk as it did pre-v0.13.0. The SDK's multi-store will track and ensure the proper
heights are pruned. The operator can set the pruning options via a `pruning` config via the CLI or
through `app.toml`. The `pruning` flag exposes `default|everything|nothing|custom` as options --
see docs for further details. If the operator chooses `custom`, they may provide granular pruning
options `pruning-keep-recent`, `pruning-keep-every`, and `pruning-interval`. The former two options
dictate how many recent versions are kept on disk and the offset of what versions are kept after that
respectively, and the latter defines the height interval in which versions are deleted in a batch.
**Note, there are some client-facing API breaking changes with regard to IAVL, stores, and pruning settings.**
* (x/distribution) [\#6210](https://github.com/cosmos/cosmos-sdk/pull/6210) Register `MsgFundCommunityPool` in distribution amino codec.
* (types) [\#5741](https://github.com/cosmos/cosmos-sdk/issues/5741) Prevent `ChainAnteDecorators()` from panicking when empty `AnteDecorator` slice is supplied.
* (baseapp) [\#6306](https://github.com/cosmos/cosmos-sdk/issues/6306) Prevent events emitted by the antehandler from being persisted between transactions.
* (client/keys) [\#5091](https://github.com/cosmos/cosmos-sdk/issues/5091) `keys parse` does not honor client app's configuration.
* (x/bank) [\#6674](https://github.com/cosmos/cosmos-sdk/pull/6674) Create account if recipient does not exist on handing `MsgMultiSend`.
* (x/auth) [\#6287](https://github.com/cosmos/cosmos-sdk/pull/6287) Fix nonce stuck when sending multiple transactions from an account in a same block.

## [v0.38.5] - 2020-07-02

### Improvements

* (tendermint) Bump Tendermint version to [v0.33.6](https://github.com/tendermint/tendermint/releases/tag/v0.33.6).

## [v0.38.4] - 2020-05-21

### Bug Fixes

* (x/auth) [\#5950](https://github.com/cosmos/cosmos-sdk/pull/5950) Fix `IncrementSequenceDecorator` to use is `IsReCheckTx` instead of `IsCheckTx` to allow account sequence incrementing.

## [v0.38.3] - 2020-04-09

Expand Down Expand Up @@ -301,7 +355,6 @@ to detail this new feature and how state transitions occur.
now exists a single `Params` type with a getter and setter along with a getter for each individual parameter.

### Bug Fixes

* (rest) [\#5508](https://github.com/cosmos/cosmos-sdk/pull/5508) Fix `x/distribution` endpoints to properly return height in the response.
* (x/genutil) [\#5499](https://github.com/cosmos/cosmos-sdk/pull/) Ensure `DefaultGenesis` returns valid and non-nil default genesis state.
* (client) [\#5303](https://github.com/cosmos/cosmos-sdk/issues/5303) Fix ignored error in tx generate only mode.
Expand Down Expand Up @@ -2901,7 +2954,9 @@ BUG FIXES:

<!-- Release links -->

[Unreleased]: https://github.com/cosmos/cosmos-sdk/compare/v0.38.2...HEAD
[Unreleased]: https://github.com/cosmos/cosmos-sdk/compare/v0.39.1...HEAD
[v0.39.1]: https://github.com/cosmos/cosmos-sdk/releases/tag/v0.39.1
[v0.39.0]: https://github.com/cosmos/cosmos-sdk/releases/tag/v0.39.0
[v0.38.2]: https://github.com/cosmos/cosmos-sdk/releases/tag/v0.38.2
[v0.38.1]: https://github.com/cosmos/cosmos-sdk/releases/tag/v0.38.1
[v0.38.0]: https://github.com/cosmos/cosmos-sdk/releases/tag/v0.38.0
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ update-swagger-docs: statik

mocks: $(MOCKS_DIR)
mockgen -source=x/auth/types/account_retriever.go -package mocks -destination tests/mocks/account_retriever.go
mockgen -source=types/handler.go -package mocks -destination tests/mocks/types_handler.go
.PHONY: mocks

$(MOCKS_DIR):
Expand Down
20 changes: 20 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cosmos SDK v0.39.1 Release Notes

This release fixes the [issue affecting the accounts migration](https://github.com/cosmos/cosmos-sdk/issues/6828) from v0.38 to v0.39.

See the [Cosmos SDK 0.39.1 milestone](https://github.com/cosmos/cosmos-sdk/milestone/29?closed=1) on our issue tracker for details.

## Remove custom JSON serialization for account types

Account types JSON serialization has now changed to Amino. Changes are significant (e.g. integers are treated
as strings) thus it is required to migrate the exported state of an application before restarting the node
with a more recent version of the Cosmos SDK.

## REST server's --unsafe-cors mode

This a UX improvement [back ported from master](https://github.com/cosmos/cosmos-sdk/pull/6853) that allows developers to disable CORS
restrictions during app development and testing by passing the `--unsafe-cors` option to the client's `rest-server` command.

## Tendermint 0.33.7

Tendermint 0.33.7 brings an important regression fix. Please refer to [this bug report](https://github.com/tendermint/tendermint/issues/5112) for more information.
20 changes: 14 additions & 6 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBloc
func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx {
tx, err := app.txDecoder(req.Tx)
if err != nil {
return sdkerrors.ResponseCheckTx(err, 0, 0, app.debug)
return sdkerrors.ResponseCheckTx(err, 0, 0, app.trace)
}

var mode runTxMode
Expand All @@ -181,7 +181,7 @@ func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx {

gInfo, result, err := app.runTx(mode, req.Tx, tx)
if err != nil {
return sdkerrors.ResponseCheckTx(err, gInfo.GasWanted, gInfo.GasUsed, app.debug)
return sdkerrors.ResponseCheckTx(err, gInfo.GasWanted, gInfo.GasUsed, app.trace)
}

return abci.ResponseCheckTx{
Expand All @@ -201,12 +201,12 @@ func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx {
func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) abci.ResponseDeliverTx {
tx, err := app.txDecoder(req.Tx)
if err != nil {
return sdkerrors.ResponseDeliverTx(err, 0, 0, app.debug)
return sdkerrors.ResponseDeliverTx(err, 0, 0, app.trace)
}

gInfo, result, err := app.runTx(runTxModeDeliver, req.Tx, tx)
if err != nil {
return sdkerrors.ResponseDeliverTx(err, gInfo.GasWanted, gInfo.GasUsed, app.debug)
return sdkerrors.ResponseDeliverTx(err, gInfo.GasWanted, gInfo.GasUsed, app.trace)
}

return abci.ResponseDeliverTx{
Expand Down Expand Up @@ -326,12 +326,20 @@ func handleQueryApp(app *BaseApp, path []string, req abci.RequestQuery) abci.Res
return sdkerrors.QueryResult(sdkerrors.Wrap(err, "failed to decode tx"))
}

gInfo, _, _ := app.Simulate(txBytes, tx)
gInfo, res, err := app.Simulate(txBytes, tx)
if err != nil {
return sdkerrors.QueryResult(sdkerrors.Wrap(err, "failed to simulate tx"))
}

simRes := sdk.SimulationResponse{
GasInfo: gInfo,
Result: res,
}

return abci.ResponseQuery{
Codespace: sdkerrors.RootCodespace,
Height: req.Height,
Value: codec.Cdc.MustMarshalBinaryLengthPrefixed(gInfo.GasUsed),
Value: codec.Cdc.MustMarshalBinaryBare(simRes),
}

case "version":
Expand Down
13 changes: 7 additions & 6 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ type BaseApp struct { // nolint: maligned
// application's version string
appVersion string

// debug flag turns on more error reporting
debug bool
// trace set will return full stack traces for errors in ABCI Log field
trace bool
}

// NewBaseApp returns a reference to an initialized BaseApp. It accepts a
Expand All @@ -130,7 +130,7 @@ func NewBaseApp(
queryRouter: NewQueryRouter(),
txDecoder: txDecoder,
fauxMerkleMode: false,
debug: false,
trace: false,
}
for _, option := range options {
option(app)
Expand Down Expand Up @@ -358,8 +358,8 @@ func (app *BaseApp) setInterBlockCache(cache sdk.MultiStorePersistentCache) {
app.interBlockCache = cache
}

func (app *BaseApp) setDebug(debug bool) {
app.debug = debug
func (app *BaseApp) setTrace(trace bool) {
app.trace = trace
}

// Router returns the router of the BaseApp.
Expand Down Expand Up @@ -604,8 +604,9 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte, tx sdk.Tx) (gInfo sdk.
// writes do not happen if aborted/failed. This may have some
// performance benefits, but it'll be more difficult to get right.
anteCtx, msCache = app.cacheTxContext(ctx, txBytes)

anteCtx = anteCtx.WithEventManager(sdk.NewEventManager())
newCtx, err := app.anteHandler(anteCtx, tx, mode == runTxModeSimulate)

if !newCtx.IsZero() {
// At this point, newCtx.MultiStore() is cache-wrapped, or something else
// replaced by the AnteHandler. We want the original multistore, not one
Expand Down
110 changes: 51 additions & 59 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) {

func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) {
rs := rootmulti.NewStore(db)
rs.SetPruning(store.PruneSyncable)
rs.SetPruning(store.PruneDefault)
key := sdk.NewKVStoreKey(storeKey)
rs.MountStoreWithDB(key, store.StoreTypeIAVL, nil)
err := rs.LoadLatestVersion()
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestSetLoader(t *testing.T) {

func TestAppVersionSetterGetter(t *testing.T) {
logger := defaultLogger()
pruningOpt := SetPruning(store.PruneSyncable)
pruningOpt := SetPruning(store.PruneDefault)
db := dbm.NewMemDB()
name := t.Name()
app := NewBaseApp(name, logger, db, nil, pruningOpt)
Expand Down Expand Up @@ -329,8 +329,9 @@ func TestLoadVersionInvalid(t *testing.T) {
func TestLoadVersionPruning(t *testing.T) {
logger := log.NewNopLogger()
pruningOptions := store.PruningOptions{
KeepEvery: 2,
SnapshotEvery: 6,
KeepRecent: 2,
KeepEvery: 3,
Interval: 1,
}
pruningOpt := SetPruning(pruningOptions)
db := dbm.NewMemDB()
Expand All @@ -351,61 +352,33 @@ func TestLoadVersionPruning(t *testing.T) {
require.Equal(t, int64(0), lastHeight)
require.Equal(t, emptyCommitID, lastID)

// execute a block
header := abci.Header{Height: 1}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res := app.Commit()

// execute a block, collect commit ID
header = abci.Header{Height: 2}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
commitID2 := sdk.CommitID{Version: 2, Hash: res.Data}

// execute a block
header = abci.Header{Height: 3}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
commitID3 := sdk.CommitID{Version: 3, Hash: res.Data}

// reload with LoadLatestVersion, check it loads last flushed version
app = NewBaseApp(name, logger, db, nil, pruningOpt)
app.MountStores(capKey)
err = app.LoadLatestVersion(capKey)
require.Nil(t, err)
testLoadVersionHelper(t, app, int64(2), commitID2)
var lastCommitID sdk.CommitID

// re-execute block 3 and check it is same CommitID
header = abci.Header{Height: 3}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
recommitID3 := sdk.CommitID{Version: 3, Hash: res.Data}
require.Equal(t, commitID3, recommitID3, "Commits of identical blocks not equal after reload")
// Commit seven blocks, of which 7 (latest) is kept in addition to 6, 5
// (keep recent) and 3 (keep every).
for i := int64(1); i <= 7; i++ {
app.BeginBlock(abci.RequestBeginBlock{Header: abci.Header{Height: i}})
res := app.Commit()
lastCommitID = sdk.CommitID{Version: i, Hash: res.Data}
}

// execute a block, collect commit ID
header = abci.Header{Height: 4}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
commitID4 := sdk.CommitID{Version: 4, Hash: res.Data}
for _, v := range []int64{1, 2, 4} {
_, err = app.cms.CacheMultiStoreWithVersion(v)
require.Error(t, err)
}

// execute a block
header = abci.Header{Height: 5}
app.BeginBlock(abci.RequestBeginBlock{Header: header})
res = app.Commit()
for _, v := range []int64{3, 5, 6, 7} {
_, err = app.cms.CacheMultiStoreWithVersion(v)
require.NoError(t, err)
}

// reload with LoadLatestVersion, check it loads last flushed version
// reload with LoadLatestVersion, check it loads last version
app = NewBaseApp(name, logger, db, nil, pruningOpt)
app.MountStores(capKey)

err = app.LoadLatestVersion(capKey)
require.Nil(t, err)
testLoadVersionHelper(t, app, int64(4), commitID4)

// reload with LoadVersion of previous flushed version
// and check it fails since previous flush should be pruned
app = NewBaseApp(name, logger, db, nil, pruningOpt)
app.MountStores(capKey)
err = app.LoadVersion(2, capKey)
require.NotNil(t, err)
testLoadVersionHelper(t, app, int64(7), lastCommitID)
}

func testLoadVersionHelper(t *testing.T, app *BaseApp, expectedHeight int64, expectedID sdk.CommitID) {
Expand Down Expand Up @@ -685,20 +658,33 @@ func testTxDecoder(cdc *codec.Codec) sdk.TxDecoder {
}

func anteHandlerTxTest(t *testing.T, capKey sdk.StoreKey, storeKey []byte) sdk.AnteHandler {
return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) {
return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) {
store := ctx.KVStore(capKey)
txTest := tx.(txTest)

if txTest.FailOnAnte {
return newCtx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure")
return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure")
}

_, err = incrementingCounter(t, store, storeKey, txTest.Counter)
_, err := incrementingCounter(t, store, storeKey, txTest.Counter)
if err != nil {
return newCtx, err
return ctx, err
}

return newCtx, nil
ctx.EventManager().EmitEvents(
counterEvent("ante_handler", txTest.Counter),
)

return ctx, nil
}
}

func counterEvent(evType string, msgCount int64) sdk.Events {
return sdk.Events{
sdk.NewEvent(
evType,
sdk.NewAttribute("update_counter", fmt.Sprintf("%d", msgCount)),
),
}
}

Expand Down Expand Up @@ -985,10 +971,13 @@ func TestSimulateTx(t *testing.T) {
queryResult := app.Query(query)
require.True(t, queryResult.IsOK(), queryResult.Log)

var res uint64
err = codec.Cdc.UnmarshalBinaryLengthPrefixed(queryResult.Value, &res)
var simRes sdk.SimulationResponse
err = codec.Cdc.UnmarshalBinaryBare(queryResult.Value, &simRes)
require.NoError(t, err)
require.Equal(t, gasConsumed, res)
require.Equal(t, gInfo, simRes.GasInfo)
require.Equal(t, result.Log, simRes.Result.Log)
require.Equal(t, result.Events, simRes.Result.Events)
require.True(t, bytes.Equal(result.Data, simRes.Result.Data))
app.EndBlock(abci.RequestEndBlock{})
app.Commit()
}
Expand Down Expand Up @@ -1312,6 +1301,7 @@ func TestBaseAppAnteHandler(t *testing.T) {
txBytes, err := cdc.MarshalBinaryLengthPrefixed(tx)
require.NoError(t, err)
res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes})
require.Empty(t, res.Events)
require.False(t, res.IsOK(), fmt.Sprintf("%v", res))

ctx := app.getState(runTxModeDeliver).ctx
Expand All @@ -1327,6 +1317,7 @@ func TestBaseAppAnteHandler(t *testing.T) {
require.NoError(t, err)

res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes})
require.Empty(t, res.Events)
require.False(t, res.IsOK(), fmt.Sprintf("%v", res))

ctx = app.getState(runTxModeDeliver).ctx
Expand All @@ -1342,6 +1333,7 @@ func TestBaseAppAnteHandler(t *testing.T) {
require.NoError(t, err)

res = app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes})
require.NotEmpty(t, res.Events)
require.True(t, res.IsOK(), fmt.Sprintf("%v", res))

ctx = app.getState(runTxModeDeliver).ctx
Expand Down
Loading

0 comments on commit c2c8529

Please sign in to comment.