fixed rpc test failure in eth.blockNumber
This commit is contained in:
parent
9ac1b4e59e
commit
3e1d635f8d
@ -55,6 +55,7 @@ var (
|
|||||||
"eth_getBlockByHash": (*ethApi).GetBlockByHash,
|
"eth_getBlockByHash": (*ethApi).GetBlockByHash,
|
||||||
"eth_getBlockByNumber": (*ethApi).GetBlockByNumber,
|
"eth_getBlockByNumber": (*ethApi).GetBlockByNumber,
|
||||||
"eth_getTransactionByHash": (*ethApi).GetTransactionByHash,
|
"eth_getTransactionByHash": (*ethApi).GetTransactionByHash,
|
||||||
|
"eth_getTransactionByBlockNumberAndIndex": (*ethApi).GetTransactionByBlockNumberAndIndex,
|
||||||
"eth_getTransactionByBlockHashAndIndex": (*ethApi).GetTransactionByBlockHashAndIndex,
|
"eth_getTransactionByBlockHashAndIndex": (*ethApi).GetTransactionByBlockHashAndIndex,
|
||||||
"eth_getUncleByBlockHashAndIndex": (*ethApi).GetUncleByBlockHashAndIndex,
|
"eth_getUncleByBlockHashAndIndex": (*ethApi).GetUncleByBlockHashAndIndex,
|
||||||
"eth_getUncleByBlockNumberAndIndex": (*ethApi).GetUncleByBlockNumberAndIndex,
|
"eth_getUncleByBlockNumberAndIndex": (*ethApi).GetUncleByBlockNumberAndIndex,
|
||||||
@ -115,7 +116,8 @@ func (self *ethApi) Hashrate(req *shared.Request) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *ethApi) BlockNumber(req *shared.Request) (interface{}, error) {
|
func (self *ethApi) BlockNumber(req *shared.Request) (interface{}, error) {
|
||||||
return self.xeth.CurrentBlock().Number(), nil
|
num := self.xeth.CurrentBlock().Number()
|
||||||
|
return newHexNum(num.Bytes()), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *ethApi) GetBalance(req *shared.Request) (interface{}, error) {
|
func (self *ethApi) GetBalance(req *shared.Request) (interface{}, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user