aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/eth_args.go
diff options
context:
space:
mode:
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 {