Skip to content

Commit

Permalink
Fix limit check
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Mar 25, 2024
1 parent 4e324b1 commit a51f17c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eth/filters/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (f *Filter) Logs(ctx context.Context) ([]*types.Log, error) {
blocks[log.BlockNumber] = true
}

if len(blocks) > int(f.limit) {
if len(blocks) >= int(f.limit) {
return true
}

Expand Down
2 changes: 1 addition & 1 deletion eth/filters/filter_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (f *TxFilter) Transactions(ctx context.Context) ([]*ethapi.RPCTransaction,
blocks[tx.BlockNumber.ToInt().Uint64()] = true
}

if len(blocks) > int(f.limit) {
if len(blocks) >= int(f.limit) {
return true
}

Expand Down

0 comments on commit a51f17c

Please sign in to comment.