aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/messages.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-25 16:57:49 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-25 16:57:49 +0800
commit9e0ab22dd01d677a853f1af2c865f8654081ca26 (patch)
tree9bdf97670aca415311c2d768d05edd5b8f3bc060 /rpc/messages.go
parent52ccaa605e2a693bda64ac7d9fadf88d669ac446 (diff)
downloaddexon-9e0ab22dd01d677a853f1af2c865f8654081ca26.tar.gz
dexon-9e0ab22dd01d677a853f1af2c865f8654081ca26.tar.zst
dexon-9e0ab22dd01d677a853f1af2c865f8654081ca26.zip
Stub defaultBlock methods
Diffstat (limited to 'rpc/messages.go')
-rw-r--r--rpc/messages.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/rpc/messages.go b/rpc/messages.go
index 044f07545..b37d8229d 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -210,6 +210,19 @@ func (req *RpcRequest) ToBoolArgs() (bool, error) {
return args, nil
}
+func (req *RpcRequest) ToIntArgs() (int, error) {
+ if len(req.Params) < 1 {
+ return 0, errArguments
+ }
+
+ var args int
+ if err := json.Unmarshal(req.Params[0], &args); err != nil {
+ return 0, errArguments
+ }
+
+ return args, nil
+}
+
func (req *RpcRequest) ToCompileArgs() (string, error) {
if len(req.Params) < 1 {
return "", errArguments