forked from cerc-io/laconicd-deprecated
update rpc tests (#276)
* update rpc tests * cleanup * add log assertion to getTransacionReceipt * fix queurier_test * address comment
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user