evm: fix get storage (#375)

This commit is contained in:
Federico Kunze Küllmer
2021-07-27 14:33:56 +00:00
committed by GitHub
parent 8491ae3c64
commit bc2a2eb8f3
2 changed files with 0 additions and 22 deletions
-13
View File
@@ -154,13 +154,6 @@ func (k Keeper) Storage(c context.Context, req *types.QueryStorageRequest) (*typ
)
}
if ethermint.IsEmptyHash(req.Key) {
return nil, status.Errorf(
codes.InvalidArgument,
types.ErrEmptyHash.Error(),
)
}
ctx := sdk.UnwrapSDKContext(c)
k.WithContext(ctx)
@@ -170,12 +163,6 @@ func (k Keeper) Storage(c context.Context, req *types.QueryStorageRequest) (*typ
state := k.GetState(address, key)
stateHex := state.Hex()
if ethermint.IsEmptyHash(stateHex) {
return nil, status.Error(
codes.NotFound, "contract code not found for given address",
)
}
return &types.QueryStorageResponse{
Value: stateHex,
}, nil
-9
View File
@@ -271,15 +271,6 @@ func (suite *KeeperTestSuite) TestQueryStorage() {
},
false,
},
{"empty hash",
func() {
req = &types.QueryStorageRequest{
Address: suite.address.String(),
Key: ethcmn.Hash{}.String(),
}
},
false,
},
{
"success",
func() {