瀏覽代碼

eth/filters: derive FilterCriteria from ethereum.FilterQuery (#16629)

Domino Valdano 7 年之前
父節點
當前提交
fedae95015
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      eth/filters/api.go

+ 2 - 8
eth/filters/api.go

@@ -268,14 +268,8 @@ func (api *PublicFilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc
 }
 
 // FilterCriteria represents a request to create a new filter.
-//
-// TODO(karalabe): Kill this in favor of ethereum.FilterQuery.
-type FilterCriteria struct {
-	FromBlock *big.Int
-	ToBlock   *big.Int
-	Addresses []common.Address
-	Topics    [][]common.Hash
-}
+// Same as ethereum.FilterQuery but with UnmarshalJSON() method.
+type FilterCriteria ethereum.FilterQuery
 
 // NewFilter creates a new filter and returns the filter id. It can be
 // used to retrieve logs when the state changes. This method cannot be