aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/eth_args.go
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2015-10-29 23:58:23 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-10-30 00:35:43 +0800
commit76410df6a21a10dec09ca955b1896ac083853ef7 (patch)
tree2b40fc8df739be1ecdecf8838dc1fe149836820e /rpc/api/eth_args.go
parent56f8699a6c6bfe613d2ab28c47631a1f4a29e36f (diff)
downloadgo-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar.gz
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar.bz2
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar.lz
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar.xz
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.tar.zst
go-tangerine-76410df6a21a10dec09ca955b1896ac083853ef7.zip
rpc: return an unsupported error when "pending" was used to create a filter
Diffstat (limited to 'rpc/api/eth_args.go')
-rw-r--r--rpc/api/eth_args.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go
index 6aca6a663..a406d0817 100644
--- a/rpc/api/eth_args.go
+++ b/rpc/api/eth_args.go
@@ -714,6 +714,13 @@ func (args *BlockFilterArgs) UnmarshalJSON(b []byte) (err error) {
return err
}
}
+
+ if num == -2 {
+ return fmt.Errorf("\"pending\" is unsupported")
+ } else if num < -2 {
+ return fmt.Errorf("Invalid to block number")
+ }
+
args.Latest = num
if obj[0].Limit == nil {