diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-30 20:47:18 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-30 20:47:18 +0800 |
commit | af927ffdaf0c2c31047d22ab4a3163a4ef9d2342 (patch) | |
tree | 5269be68210713e977635069cdcb52bbf36396e3 /rpc/message.go | |
parent | c03d403437c20584bcbf3cf3fa9d79ac7a0a8ca7 (diff) | |
download | go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar.gz go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar.bz2 go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar.lz go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar.xz go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.tar.zst go-tangerine-af927ffdaf0c2c31047d22ab4a3163a4ef9d2342.zip |
Added whisper messages
* have identity & get messages
Diffstat (limited to 'rpc/message.go')
-rw-r--r-- | rpc/message.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/rpc/message.go b/rpc/message.go index 919302921..26fac9d37 100644 --- a/rpc/message.go +++ b/rpc/message.go @@ -287,7 +287,7 @@ func (req *RpcRequest) ToWhisperFilterArgs() (*xeth.Options, error) { return &args, nil } -func (req *RpcRequest) ToWhisperChangedArgs() (int, error) { +func (req *RpcRequest) ToWhisperIdArgs() (int, error) { if len(req.Params) < 1 { return 0, NewErrorResponse(ErrorArguments) } @@ -314,3 +314,17 @@ func (req *RpcRequest) ToWhisperPostArgs() (*WhisperMessageArgs, error) { rpclogger.DebugDetailf("%T %v", args, args) return &args, nil } + +func (req *RpcRequest) ToWhisperHasIdentityArgs() (string, error) { + if len(req.Params) < 1 { + return "", NewErrorResponse(ErrorArguments) + } + + var args string + err := json.Unmarshal(req.Params[0], &args) + if err != nil { + return "", err + } + rpclogger.DebugDetailf("%T %v", args, args) + return args, nil +} |