Remove custom MarshalJSON methods

Now formats based on underlying hexdata or hexnum type. Fields directly
with respective constructors that cover from native types
This commit is contained in:
Taylor Gerring
2015-03-31 19:04:02 +02:00
parent a2501ecfcd
commit 7e3875b527
3 changed files with 187 additions and 299 deletions

View File

@ -244,7 +244,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
}
uhash := br.Uncles[args.Index]
uncle := NewBlockRes(api.xeth().EthBlockByHash(uhash.Hex()))
uncle := NewBlockRes(api.xeth().EthBlockByHash(uhash.String()))
*reply = uncle
case "eth_getUncleByBlockNumberAndIndex":
@ -262,7 +262,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
}
uhash := v.Uncles[args.Index]
uncle := NewBlockRes(api.xeth().EthBlockByHash(uhash.Hex()))
uncle := NewBlockRes(api.xeth().EthBlockByHash(uhash.String()))
*reply = uncle
case "eth_getCompilers":