update rpc tests (#276)

* update rpc tests

* cleanup

* add log assertion to getTransacionReceipt

* fix queurier_test

* address comment
This commit is contained in:
noot
2020-05-04 18:02:26 -04:00
committed by GitHub
parent 26d4e968e0
commit ce0feb307b
10 changed files with 147 additions and 159 deletions
+4 -3
View File
@@ -36,8 +36,8 @@ func NewQuerier(keeper Keeper) sdk.Querier {
return queryNonce(ctx, path, keeper)
case types.QueryHashToHeight:
return queryHashToHeight(ctx, path, keeper)
case types.QueryTxLogs:
return queryTxLogs(ctx, path, keeper)
case types.QueryTransactionLogs:
return queryTransactionLogs(ctx, path, keeper)
case types.QueryLogsBloom:
return queryBlockLogsBloom(ctx, path, keeper)
case types.QueryLogs:
@@ -161,8 +161,9 @@ func queryBlockLogsBloom(ctx sdk.Context, path []string, keeper Keeper) ([]byte,
return bz, nil
}
func queryTxLogs(ctx sdk.Context, path []string, keeper Keeper) ([]byte, error) {
func queryTransactionLogs(ctx sdk.Context, path []string, keeper Keeper) ([]byte, error) {
txHash := ethcmn.HexToHash(path[1])
logs, err := keeper.GetLogs(ctx, txHash)
if err != nil {
return nil, err
+1 -1
View File
@@ -26,7 +26,7 @@ func (suite *KeeperTestSuite) TestQuerier() {
{"code", []string{types.QueryCode, "0x0"}, func() {}, true},
{"nonce", []string{types.QueryNonce, "0x0"}, func() {}, true},
// {"hash to height", []string{types.QueryHashToHeight, "0x0"}, func() {}, true},
{"tx logs", []string{types.QueryTxLogs, "0x0"}, func() {}, true},
{"tx logs", []string{types.QueryTransactionLogs, "0x0"}, func() {}, true},
// {"logs bloom", []string{types.QueryLogsBloom, "0x0"}, func() {}, true},
{"logs", []string{types.QueryLogs, "0x0"}, func() {}, true},
{"account", []string{types.QueryAccount, "0x0"}, func() {}, true},