From 11e82761b47c666a8fa2a099a190d33125ae16a0 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 18 May 2022 16:02:55 +0800 Subject: [PATCH] Apply suggestions from code review --- app/middleware/eth_test.go | 3 --- app/middleware/middleware_test.go | 2 -- client/testnet.go | 1 - scripts/integration-test-all.sh | 1 - 4 files changed, 7 deletions(-) diff --git a/app/middleware/eth_test.go b/app/middleware/eth_test.go index a68bb546..3b79b8b6 100644 --- a/app/middleware/eth_test.go +++ b/app/middleware/eth_test.go @@ -384,7 +384,6 @@ func (suite MiddlewareTestSuite) TestCanTransferDecorator() { func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() { txHandler := middleware.ComposeMiddlewares(noopTxHandler, ante.NewEthIncrementSenderSequenceMiddleware(suite.app.AccountKeeper)) - addr, privKey := tests.NewAddrKey() contract := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 0, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil) @@ -456,7 +455,6 @@ func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() { return } - // _, err := dec.AnteHandle(suite.ctx, tc.tx, false, nextFn) _, _, err := txHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.tx}, txtypes.RequestCheckTx{}) if tc.expPass { suite.Require().NoError(err) @@ -482,7 +480,6 @@ func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() { func (suite MiddlewareTestSuite) TestEthSetupContextDecorator() { txHandler := middleware.ComposeMiddlewares(noopTxHandler, ante.NewEthSetUpContextMiddleware(suite.app.EvmKeeper)) - tx := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 1, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil) testCases := []struct { diff --git a/app/middleware/middleware_test.go b/app/middleware/middleware_test.go index 05801bee..b569b6e1 100644 --- a/app/middleware/middleware_test.go +++ b/app/middleware/middleware_test.go @@ -398,7 +398,6 @@ func (suite MiddlewareTestSuite) TestAnteHandler() { suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx) // expConsumed := params.TxGasContractCreation + params.TxGas - // _, err := suite.anteHandler(suite.ctx, tc.txFn(), false) _, _, err := suite.anteHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.txFn()}, tx.RequestCheckTx{}) // suite.Require().Equal(consumed, ctx.GasMeter().GasConsumed()) @@ -677,7 +676,6 @@ func (suite MiddlewareTestSuite) TestAnteHandlerWithDynamicTxFee() { suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx) suite.app.EvmKeeper.SetBalance(suite.ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000)) - // _, err := suite.anteHandler(suite.ctx, tc.txFn(), false) _, _, err := suite.anteHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.txFn()}, tx.RequestCheckTx{}) if tc.expPass { suite.Require().NoError(err) diff --git a/client/testnet.go b/client/testnet.go index cf4e9098..50172d2e 100644 --- a/client/testnet.go +++ b/client/testnet.go @@ -456,7 +456,6 @@ func collectGenFiles( outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { var appState json.RawMessage - // genTime := tmtime.Now() genTime := time.Now() for i := 0; i < numValidators; i++ { diff --git a/scripts/integration-test-all.sh b/scripts/integration-test-all.sh index 3c729f88..20e68eeb 100755 --- a/scripts/integration-test-all.sh +++ b/scripts/integration-test-all.sh @@ -53,7 +53,6 @@ done set -euxo pipefail -DATA_DIR=$(mktemp -d -t ethermint-datadir.XXXXX) DATA_DIR=$(mktemp -d -t chibaclonk-datadir.XXXXX) if [[ ! "$DATA_DIR" ]]; then