From 85e03217de038fc84f5161c81468ed7f218bd876 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Thu, 19 Mar 2015 20:09:54 -0400 Subject: [PATCH] inline NewWhisperIdentity --- rpc/api.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rpc/api.go b/rpc/api.go index e2a18528b..0d67afca0 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -303,11 +303,6 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageAtArgs, reply *interface{}) e return nil } -func (p *EthereumApi) NewWhisperIdentity(reply *interface{}) error { - *reply = p.xeth().Whisper().NewIdentity() - return nil -} - // func (p *EthereumApi) RemoveWhisperIdentity(args *WhisperIdentityArgs, reply *interface{}) error { // *reply = p.xeth().Whisper().RemoveIdentity(args.Identity) // return nil @@ -703,6 +698,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err := json.Unmarshal(req.Params, &args); err != nil { return err } + if err := args.requirements(); err != nil { return err } @@ -718,7 +714,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error } return p.WhisperPost(args, reply) case "shh_newIdentity": - return p.NewWhisperIdentity(reply) + *reply = p.xeth().Whisper().NewIdentity() // case "shh_removeIdentity": // args := new(WhisperIdentityArgs) // if err := json.Unmarshal(req.Params, &args); err != nil {