diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-01-28 00:01:30 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-02-03 16:35:59 +0800 |
commit | 5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c (patch) | |
tree | ae78c0511eaead00800acc268d2782cb2ceef9b0 /eth/filters | |
parent | a8fd0de0d344ce3828901fa47204a68971184684 (diff) | |
download | go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar.gz go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar.bz2 go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar.lz go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar.xz go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.tar.zst go-tangerine-5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c.zip |
cmd, eth, rpc: fix some RPC issues with pending blocks
Diffstat (limited to 'eth/filters')
-rw-r--r-- | eth/filters/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/filters/api.go b/eth/filters/api.go index f2b0ed32f..aa4c305a6 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -239,13 +239,13 @@ func (args *NewFilterArgs) UnmarshalJSON(data []byte) error { return err } - if raw.From == nil { + if raw.From == nil || raw.From.Int64() < 0 { args.FromBlock = rpc.LatestBlockNumber } else { args.FromBlock = *raw.From } - if raw.ToBlock == nil { + if raw.ToBlock == nil || raw.ToBlock.Int64() < 0 { args.ToBlock = rpc.LatestBlockNumber } else { args.ToBlock = *raw.ToBlock |