From 6af81fc62e54246b7ad45ca30b5b6d1fdd3baa51 Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Fri, 8 Jun 2018 13:13:51 -0700 Subject: [PATCH] cleanup --- baseapp/baseapp.go | 5 +---- x/auth/mock/simulate_block.go | 21 --------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 0664f18eba..4d32b92f5c 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -237,10 +237,7 @@ func (app *BaseApp) NewContext(isCheckTx bool, header abci.Header) sdk.Context { if isCheckTx { return sdk.NewContext(app.checkState.ms, header, true, nil, app.Logger) } - aa := app.deliverState - a := aa.ms - b := app.Logger - return sdk.NewContext(a, header, false, nil, b) + return sdk.NewContext(app.deliverState.ms, header, false, nil, app.Logger) } type state struct { diff --git a/x/auth/mock/simulate_block.go b/x/auth/mock/simulate_block.go index f8be0c65a3..72ec8411fa 100644 --- a/x/auth/mock/simulate_block.go +++ b/x/auth/mock/simulate_block.go @@ -76,26 +76,5 @@ func SignCheckDeliver(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, seq []int } app.EndBlock(abci.RequestEndBlock{}) - // XXX fix code or add explaination as to why using commit breaks a bunch of these tests app.Commit() } - -// XXX the only reason we are using Sign Deliver here is because the tests -// break on check tx the second time you use SignCheckDeliver in a test because -// the checktx state has not been updated likely because commit is not being -// called! -//func SignDeliver(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, seq []int64, expPass bool, priv ...crypto.PrivKeyEd25519) { - -//// Sign the tx -//tx := GenTx(msg, seq, priv...) - -//// Simulate a Block -//app.BeginBlock(abci.RequestBeginBlock{}) -//res := app.Deliver(tx) -//if expPass { -//require.Equal(t, sdk.ABCICodeOK, res.Code, res.Log) -//} else { -//require.NotEqual(t, sdk.ABCICodeOK, res.Code, res.Log) -//} -//app.EndBlock(abci.RequestEndBlock{}) -//}