From dba4f3122e83a66edc1fa089c5d69f789b07a6b3 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Thu, 19 Feb 2015 13:21:37 +0100 Subject: Added uninstall filter methods --- rpc/message.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'rpc/message.go') diff --git a/rpc/message.go b/rpc/message.go index b5b852f54..524d7fc84 100644 --- a/rpc/message.go +++ b/rpc/message.go @@ -231,6 +231,21 @@ func (req *RpcRequest) ToFilterStringArgs() (string, error) { return args, nil } +func (req *RpcRequest) ToUninstallFilterArgs() (int, error) { + if len(req.Params) < 1 { + return 0, NewErrorResponse(ErrorArguments) + } + + var args int + err := json.Unmarshal(req.Params[0], &args) + if err != nil { + return 0, NewErrorResponse(ErrorDecodeArgs) + } + + rpclogger.DebugDetailf("%T %v", args, args) + return args, nil +} + func (req *RpcRequest) ToFilterChangedArgs() (int, error) { if len(req.Params) < 1 { return 0, NewErrorResponse(ErrorArguments) -- cgit v1.2.3