inline GetTxCountAt

This commit is contained in:
Taylor Gerring 2015-03-19 20:03:27 -04:00
parent 3aea645106
commit e530c960a4
1 changed files with 7 additions and 10 deletions

View File

@ -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 {