diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:02:31 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:02:31 +0800 |
commit | 3aea64510671c8f411f2efb0fed09e371027f9e6 (patch) | |
tree | ee0c3ecd53498a8c84e704a4b696b0e6af4a1b18 /rpc/api.go | |
parent | 7562bc1dbc23b0b8a384de29729ea24daa5c45a0 (diff) | |
download | dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar.gz dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar.bz2 dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar.lz dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar.xz dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.tar.zst dexon-3aea64510671c8f411f2efb0fed09e371027f9e6.zip |
inline GetStorage
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/rpc/api.go b/rpc/api.go index 5654ee3d3..d91618671 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -282,14 +282,6 @@ func (p *EthereumApi) Call(args *NewTxArgs, reply *interface{}) error { return nil } -func (p *EthereumApi) GetStorage(args *GetStorageArgs, reply *interface{}) error { - if err := args.requirements(); err != nil { - return err - } - *reply = p.xethWithStateNum(args.BlockNumber).State().SafeGet(args.Address).Storage() - return nil -} - func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) error { if err := args.requirements(); err != nil { return err @@ -509,7 +501,12 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err := json.Unmarshal(req.Params, &args); err != nil { return err } - return p.GetStorage(args, reply) + + if err := args.requirements(); err != nil { + return err + } + + *reply = p.xethWithStateNum(args.BlockNumber).State().SafeGet(args.Address).Storage() case "eth_getStorageAt": args := new(GetStorageAtArgs) if err := json.Unmarshal(req.Params, &args); err != nil { |