From e530c960a4b334815b3c9563b8b0b6809c082548 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Thu, 19 Mar 2015 20:03:27 -0400 Subject: inline GetTxCountAt --- rpc/api.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'rpc') 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 { -- cgit