diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:03:27 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:03:27 +0800 |
commit | e530c960a4b334815b3c9563b8b0b6809c082548 (patch) | |
tree | cf0f37ff7cf1cc4a224bfe32777266051d3f90a6 /rpc | |
parent | 3aea64510671c8f411f2efb0fed09e371027f9e6 (diff) | |
download | go-tangerine-e530c960a4b334815b3c9563b8b0b6809c082548.tar.gz go-tangerine-e530c960a4b334815b3c9563b8b0b6809c082548.tar.zst go-tangerine-e530c960a4b334815b3c9563b8b0b6809c082548.zip |
inline GetTxCountAt
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/api.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/rpc/api.go b/rpc/api.go index d91618671..820bb23b0 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -303,15 +303,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e return nil } -func (p *EthereumApi) GetTxCountAt(args *GetTxCountArgs, reply *interface{}) error { - err := args.requirements() - if err != nil { - return err - } - *reply = p.xethWithStateNum(args.BlockNumber).TxCountAt(args.Address) - return nil -} - func (p *EthereumApi) GetData(args *GetDataArgs, reply *interface{}) error { if err := args.requirements(); err != nil { return err @@ -518,7 +509,13 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err := json.Unmarshal(req.Params, &args); err != nil { return err } - return p.GetTxCountAt(args, reply) + + err := args.requirements() + if err != nil { + return err + } + + *reply = p.xethWithStateNum(args.BlockNumber).TxCountAt(args.Address) case "eth_getBlockTransactionCountByHash": args := new(GetBlockByHashArgs) if err := json.Unmarshal(req.Params, &args); err != nil { |