mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
eth/filters: ethclient set toBlock=nil to latest
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
b187581ee8
commit
41a7d00ac8
1 changed files with 1 additions and 1 deletions
|
|
@ -273,7 +273,7 @@ func (api *FilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subsc
|
|||
// from: blockNum | safe | finalized, to: nil -> historical beginning at `from` to head, then live mode.
|
||||
// Every other case should fail with an error.
|
||||
func (api *FilterAPI) logs(ctx context.Context, notifier notifier, rpcSub *rpc.Subscription, crit FilterCriteria) error {
|
||||
if crit.ToBlock != nil {
|
||||
if crit.ToBlock != nil && rpc.BlockNumber(crit.ToBlock.Int64()) != rpc.LatestBlockNumber {
|
||||
return errInvalidToBlock
|
||||
}
|
||||
if crit.FromBlock == nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue