forked from cerc-io/laconicd-deprecated
ante: check that sender is a EOA (#125)
* ante: check that sender is a EOA * fix: GetCodeSize handles nil case and comments * docs: add TODO comment * fix: use EmptyCodeHash check * lint: evmtypes instead of types * lint: fix suite error * test: set code to act not as EOA * undo comment on GetCodeSize * keeper: fix input checks * Apply suggestions from code review Co-authored-by: Akash Khosla <me@akashkhosla.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
co-authored by
Akash Khosla
Federico Kunze
parent
d3c5df9dda
commit
d7da045fc4
+14
-1
@@ -86,10 +86,23 @@ func (suite AnteTestSuite) TestNewEthAccountVerificationDecorator() {
|
||||
true,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"sender not EOA",
|
||||
tx,
|
||||
func() {
|
||||
// set not as an EOA
|
||||
suite.app.EvmKeeper.SetCode(addr, []byte("1"))
|
||||
},
|
||||
true,
|
||||
false,
|
||||
},
|
||||
{
|
||||
"not enough balance to cover tx cost",
|
||||
tx,
|
||||
func() {},
|
||||
func() {
|
||||
// reset back to EOA
|
||||
suite.app.EvmKeeper.SetCode(addr, nil)
|
||||
},
|
||||
true,
|
||||
false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user