diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-11-03 22:22:02 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-11-03 22:22:02 +0800 |
commit | 6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f (patch) | |
tree | 05e98fb000bb7182115784d881afb55b7af8a956 /rpc/api/eth_args.go | |
parent | 5ff0814b1f4f739cc7d9d244fa5855d28061194a (diff) | |
parent | 76410df6a21a10dec09ca955b1896ac083853ef7 (diff) | |
download | go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar.gz go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar.bz2 go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar.lz go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar.xz go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.tar.zst go-tangerine-6dfbbc3e11cd5c88ed7d4311b30222d5c3f6cd0f.zip |
Merge pull request #1948 from bas-vk/rpcfix
Infinite loop in filters
Diffstat (limited to 'rpc/api/eth_args.go')
-rw-r--r-- | rpc/api/eth_args.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rpc/api/eth_args.go b/rpc/api/eth_args.go index 457350d74..ed3d761f1 100644 --- a/rpc/api/eth_args.go +++ b/rpc/api/eth_args.go @@ -722,6 +722,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 { |