fix value transfer (#341)
* debugging balance and gas * add prints * remove gas consumption in ante handler * cleanup * fix test
This commit is contained in:
parent
28e28f2a7b
commit
8ba6400e88
@ -256,7 +256,7 @@ func (suite *AnteTestSuite) TestEthInvalidIntrinsicGas() {
|
|||||||
|
|
||||||
tx, err := newTestEthTx(suite.ctx, ethMsg, priv1)
|
tx, err := newTestEthTx(suite.ctx, ethMsg, priv1)
|
||||||
suite.Require().NoError(err)
|
suite.Require().NoError(err)
|
||||||
requireInvalidTx(suite.T(), suite.anteHandler, suite.ctx, tx, false)
|
requireInvalidTx(suite.T(), suite.anteHandler, suite.ctx.WithIsCheckTx(true), tx, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *AnteTestSuite) TestEthInvalidMempoolFees() {
|
func (suite *AnteTestSuite) TestEthInvalidMempoolFees() {
|
||||||
|
@ -319,8 +319,6 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
|
|||||||
|
|
||||||
// Set gas meter after ante handler to ignore gaskv costs
|
// Set gas meter after ante handler to ignore gaskv costs
|
||||||
newCtx = auth.SetGasMeter(simulate, ctx, gasLimit)
|
newCtx = auth.SetGasMeter(simulate, ctx, gasLimit)
|
||||||
newCtx.GasMeter().ConsumeGas(gas, "eth intrinsic gas")
|
|
||||||
|
|
||||||
return next(newCtx, tx, simulate)
|
return next(newCtx, tx, simulate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ func (suite *EvmTestSuite) TestQueryTxLogs() {
|
|||||||
|
|
||||||
func (suite *EvmTestSuite) TestSendTransaction() {
|
func (suite *EvmTestSuite) TestSendTransaction() {
|
||||||
gasLimit := uint64(21000)
|
gasLimit := uint64(21000)
|
||||||
gasPrice := big.NewInt(1)
|
gasPrice := big.NewInt(0x55ae82600)
|
||||||
|
|
||||||
priv, err := crypto.GenerateKey()
|
priv, err := crypto.GenerateKey()
|
||||||
suite.Require().NoError(err, "failed to create key")
|
suite.Require().NoError(err, "failed to create key")
|
||||||
|
@ -794,9 +794,9 @@ func (csdb *CommitStateDB) getStateObject(addr ethcmn.Address) (stateObject *sta
|
|||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, attempt to fetch the account from the account mapper
|
// otherwise, attempt to fetch the account from the account mapper
|
||||||
acc := csdb.accountKeeper.GetAccount(csdb.ctx, addr.Bytes())
|
acc := csdb.accountKeeper.GetAccount(csdb.ctx, sdk.AccAddress(addr.Bytes()))
|
||||||
if acc == nil {
|
if acc == nil {
|
||||||
csdb.setError(fmt.Errorf("no account found for address: %X", addr.Bytes()))
|
csdb.setError(fmt.Errorf("no account found for address: %s", addr.String()))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user