inline GetData

This commit is contained in:
Taylor Gerring 2015-03-19 20:04:02 -04:00
parent e530c960a4
commit 152b37ee11
1 changed files with 4 additions and 9 deletions

View File

@ -303,14 +303,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e
return nil return nil
} }
func (p *EthereumApi) GetData(args *GetDataArgs, reply *interface{}) error {
if err := args.requirements(); err != nil {
return err
}
*reply = p.xethWithStateNum(args.BlockNumber).CodeAt(args.Address)
return nil
}
func (p *EthereumApi) GetCompilers(reply *interface{}) error { func (p *EthereumApi) GetCompilers(reply *interface{}) error {
c := []string{""} c := []string{""}
*reply = c *reply = c
@ -565,7 +557,10 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
if err := json.Unmarshal(req.Params, &args); err != nil { if err := json.Unmarshal(req.Params, &args); err != nil {
return err return err
} }
return p.GetData(args, reply) if err := args.requirements(); err != nil {
return err
}
*reply = p.xethWithStateNum(args.BlockNumber).CodeAt(args.Address)
case "eth_sendTransaction", "eth_transact": case "eth_sendTransaction", "eth_transact":
args := new(NewTxArgs) args := new(NewTxArgs)
if err := json.Unmarshal(req.Params, &args); err != nil { if err := json.Unmarshal(req.Params, &args); err != nil {