diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-06 01:14:47 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-06 01:14:47 +0800 |
commit | a6599404e49387af8cc5302b7f22005133af4ebf (patch) | |
tree | 1289d3dc7fdb1e01af5b96b8da823ddd06020c81 | |
parent | 0d8d51084f2e6622170f5c2b03c92450cb35b25f (diff) | |
download | go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar.gz go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar.bz2 go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar.lz go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar.xz go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.tar.zst go-tangerine-a6599404e49387af8cc5302b7f22005133af4ebf.zip |
Revert to hex response
-rw-r--r-- | rpc/api.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rpc/api.go b/rpc/api.go index 9d00ae340..b97558bda 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -344,7 +344,8 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *interface{}) err } func (p *EthereumApi) GetPeerCount(reply *interface{}) error { - *reply = p.xeth().PeerCount() + c := p.xeth().PeerCount() + *reply = toHex(big.NewInt(int64(c)).Bytes()) return nil } @@ -369,7 +370,7 @@ func (p *EthereumApi) GetIsMining(reply *interface{}) error { } func (p *EthereumApi) BlockNumber(reply *interface{}) error { - *reply = p.xeth().Backend().ChainManager().CurrentBlock().Number() + *reply = toHex(p.xeth().Backend().ChainManager().CurrentBlock().Number().Bytes()) return nil } @@ -608,8 +609,6 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error return err } return p.NewFilterString(args, reply) - case "eth_newBlockFilter": - return errNotImplemented case "eth_uninstallFilter": args, err := req.ToUninstallFilterArgs() if err != nil { |