forked from cerc-io/plugeth
inline GetTxCountAt
This commit is contained in:
parent
3aea645106
commit
e530c960a4
17
rpc/api.go
17
rpc/api.go
@ -303,15 +303,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e
|
|||||||
return nil
|
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 {
|
func (p *EthereumApi) GetData(args *GetDataArgs, reply *interface{}) error {
|
||||||
if err := args.requirements(); err != nil {
|
if err := args.requirements(); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -518,7 +509,13 @@ 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.GetTxCountAt(args, reply)
|
|
||||||
|
err := args.requirements()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
*reply = p.xethWithStateNum(args.BlockNumber).TxCountAt(args.Address)
|
||||||
case "eth_getBlockTransactionCountByHash":
|
case "eth_getBlockTransactionCountByHash":
|
||||||
args := new(GetBlockByHashArgs)
|
args := new(GetBlockByHashArgs)
|
||||||
if err := json.Unmarshal(req.Params, &args); err != nil {
|
if err := json.Unmarshal(req.Params, &args); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user