first pass updating for statediffing geth 1.10.23... filters changed
This commit is contained in:
+1
-1
@@ -535,7 +535,7 @@ func (b *Backend) GetReceipts(ctx context.Context, hash common.Hash) (types.Rece
|
||||
}
|
||||
|
||||
// GetLogs returns all the logs for the given block hash
|
||||
func (b *Backend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) {
|
||||
func (b *Backend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error) {
|
||||
// Begin tx
|
||||
tx, err := b.DB.Beginx()
|
||||
if err != nil {
|
||||
|
||||
@@ -777,8 +777,8 @@ func (b *Block) Logs(ctx context.Context, args struct{ Filter BlockFilterCriteri
|
||||
hash = header.Hash()
|
||||
}
|
||||
// Construct the range filter
|
||||
filter := filters.NewBlockFilter(b.backend, hash, addresses, topics)
|
||||
|
||||
filterSys := filters.NewFilterSystem(b.backend, filters.Config{})
|
||||
filter := filterSys.NewBlockFilter(hash, addresses, topics)
|
||||
// Run the filter and return all the logs
|
||||
return runFilter(ctx, b.backend, filter)
|
||||
}
|
||||
@@ -980,7 +980,8 @@ func (r *Resolver) Logs(ctx context.Context, args struct{ Filter FilterCriteria
|
||||
topics = *args.Filter.Topics
|
||||
}
|
||||
// Construct the range filter
|
||||
filter := filters.NewRangeFilter(filters.Backend(r.backend), begin, end, addresses, topics)
|
||||
filterSys := filters.NewFilterSystem(r.backend, filters.Config{})
|
||||
filter := filterSys.NewRangeFilter(begin, end, addresses, topics)
|
||||
return runFilter(ctx, r.backend, filter)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user