aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 4ae0ff668..cdd95c888 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -126,7 +126,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- block := NewBlockRes(api.xeth().EthBlockByHash(args.BlockHash))
+ block := NewBlockRes(api.xeth().EthBlockByHash(args.BlockHash.Hex()))
*reply = common.ToHex(big.NewInt(int64(len(block.Transactions))).Bytes())
case "eth_getBlockTransactionCountByNumber":
args := new(GetBlockByNumberArgs)
@@ -142,7 +142,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- block := api.xeth().EthBlockByHash(args.BlockHash)
+ block := api.xeth().EthBlockByHash(args.BlockHash.Hex())
br := NewBlockRes(block)
*reply = common.ToHex(big.NewInt(int64(len(br.Uncles))).Bytes())
case "eth_getUncleCountByBlockNumber":
@@ -191,7 +191,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- block := api.xeth().EthBlockByHash(args.BlockHash)
+ block := api.xeth().EthBlockByHash(args.BlockHash.Hex())
br := NewBlockRes(block)
br.fullTx = args.IncludeTxs
@@ -222,7 +222,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- block := api.xeth().EthBlockByHash(args.Hash)
+ block := api.xeth().EthBlockByHash(args.Hash.Hex())
br := NewBlockRes(block)
br.fullTx = true
@@ -250,7 +250,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- br := NewBlockRes(api.xeth().EthBlockByHash(args.Hash))
+ br := NewBlockRes(api.xeth().EthBlockByHash(args.Hash.Hex()))
if args.Index > int64(len(br.Uncles)) || args.Index < 0 {
return NewValidationError("Index", "does not exist")