Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions accounts/abi/bind/v2/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,25 +473,8 @@ func (c *BoundContract) FilterLogs(opts *FilterOpts, name string, query ...[]any
if opts.End != nil {
config.ToBlock = new(big.Int).SetUint64(*opts.End)
}
/* TODO(karalabe): Replace the rest of the method below with this when supported
sub, err := c.filterer.SubscribeFilterLogs(ensureContext(opts.Context), config, logs)
*/
buff, err := c.filterer.FilterLogs(ensureContext(opts.Context), config)
if err != nil {
return nil, nil, err
}
sub := event.NewSubscription(func(quit <-chan struct{}) error {
for _, log := range buff {
select {
case logs <- log:
case <-quit:
return nil
}
}
return nil
})

return logs, sub, nil
return logs, sub, err
}

// WatchLogs filters subscribes to contract logs for future blocks, returning a
Expand Down
Loading