Apply suggestions from code review

This commit is contained in:
Roy Crihfield 2022-05-18 16:02:55 +08:00 committed by GitHub
parent 1bbb2d7f42
commit 11e82761b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 7 deletions

View File

@ -384,7 +384,6 @@ func (suite MiddlewareTestSuite) TestCanTransferDecorator() {
func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() { func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() {
txHandler := middleware.ComposeMiddlewares(noopTxHandler, ante.NewEthIncrementSenderSequenceMiddleware(suite.app.AccountKeeper)) txHandler := middleware.ComposeMiddlewares(noopTxHandler, ante.NewEthIncrementSenderSequenceMiddleware(suite.app.AccountKeeper))
addr, privKey := tests.NewAddrKey() addr, privKey := tests.NewAddrKey()
contract := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 0, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil) 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 return
} }
// _, err := dec.AnteHandle(suite.ctx, tc.tx, false, nextFn)
_, _, err := txHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.tx}, txtypes.RequestCheckTx{}) _, _, err := txHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.tx}, txtypes.RequestCheckTx{})
if tc.expPass { if tc.expPass {
suite.Require().NoError(err) suite.Require().NoError(err)
@ -482,7 +480,6 @@ func (suite MiddlewareTestSuite) TestEthIncrementSenderSequenceDecorator() {
func (suite MiddlewareTestSuite) TestEthSetupContextDecorator() { func (suite MiddlewareTestSuite) TestEthSetupContextDecorator() {
txHandler := middleware.ComposeMiddlewares(noopTxHandler, ante.NewEthSetUpContextMiddleware(suite.app.EvmKeeper)) 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) tx := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 1, big.NewInt(10), 1000, big.NewInt(1), nil, nil, nil, nil)
testCases := []struct { testCases := []struct {

View File

@ -398,7 +398,6 @@ func (suite MiddlewareTestSuite) TestAnteHandler() {
suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx) suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx)
// expConsumed := params.TxGasContractCreation + params.TxGas // 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{}) _, _, err := suite.anteHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.txFn()}, tx.RequestCheckTx{})
// suite.Require().Equal(consumed, ctx.GasMeter().GasConsumed()) // 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.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx)
suite.app.EvmKeeper.SetBalance(suite.ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000)) 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{}) _, _, err := suite.anteHandler.CheckTx(sdk.WrapSDKContext(suite.ctx), txtypes.Request{Tx: tc.txFn()}, tx.RequestCheckTx{})
if tc.expPass { if tc.expPass {
suite.Require().NoError(err) suite.Require().NoError(err)

View File

@ -456,7 +456,6 @@ func collectGenFiles(
outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator,
) error { ) error {
var appState json.RawMessage var appState json.RawMessage
// genTime := tmtime.Now()
genTime := time.Now() genTime := time.Now()
for i := 0; i < numValidators; i++ { for i := 0; i < numValidators; i++ {

View File

@ -53,7 +53,6 @@ done
set -euxo pipefail set -euxo pipefail
DATA_DIR=$(mktemp -d -t ethermint-datadir.XXXXX)
DATA_DIR=$(mktemp -d -t chibaclonk-datadir.XXXXX) DATA_DIR=$(mktemp -d -t chibaclonk-datadir.XXXXX)
if [[ ! "$DATA_DIR" ]]; then if [[ ! "$DATA_DIR" ]]; then