From 5da7ec7c18b0e37cec0950e9656f6cdddc1ae60c Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Wed, 27 Jan 2016 18:01:30 +0200 Subject: cmd, eth, rpc: fix some RPC issues with pending blocks --- eth/filters/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eth/filters') 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 -- cgit