Skip to content

Commit 8edaa1e

Browse files
committed
eth/filters: Derive FilterCriteria from ethereum.FilterQuery
1 parent 1da3302 commit 8edaa1e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

eth/filters/api.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,8 @@ func (api *PublicFilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc
268268
}
269269

270270
// FilterCriteria represents a request to create a new filter.
271-
//
272-
// TODO(karalabe): Kill this in favor of ethereum.FilterQuery.
273-
type FilterCriteria struct {
274-
FromBlock *big.Int
275-
ToBlock *big.Int
276-
Addresses []common.Address
277-
Topics [][]common.Hash
278-
}
271+
// Same as ethereum.FilterQuery but with UnmarshalJSON() method.
272+
type FilterCriteria ethereum.FilterQuery
279273

280274
// NewFilter creates a new filter and returns the filter id. It can be
281275
// used to retrieve logs when the state changes. This method cannot be

0 commit comments

Comments
 (0)