diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:09:54 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-20 08:09:54 +0800 |
commit | 85e03217de038fc84f5161c81468ed7f218bd876 (patch) | |
tree | 09d5a47d2e99f2a3df240ac6ef7318fd87a6a4d5 /rpc | |
parent | 57f6a3b5c06f1fcb6bfff5741a6f69f6cf55d89d (diff) | |
download | dexon-85e03217de038fc84f5161c81468ed7f218bd876.tar.gz dexon-85e03217de038fc84f5161c81468ed7f218bd876.tar.zst dexon-85e03217de038fc84f5161c81468ed7f218bd876.zip |
inline NewWhisperIdentity
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/api.go | 8 |
1 files 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 { |