vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
791 stars 247 forks source link

add api-logs-limit flag #777

Closed libotony closed 1 week ago

libotony commented 2 weeks ago

Description

Add a flag to allow node runner to specify the logs limit for the logs filter API.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

darrenvechain commented 2 weeks ago

Should we return an API error if the user specify more than the limit? Because if the user requests 5000 and gets 1000, then it looks like there are no more results, and they will stop making paginated requests

darrenvechain commented 2 weeks ago

@libotony I made a PR here to fix the E2E. We need to merge this to main and then put the commit SHA in the e2e GHA

https://github.com/vechain/thor-e2e-tests/pull/24/files

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 81.25000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 62.51%. Comparing base (c23c19a) to head (3ffd6ee). Report is 1 commits behind head on master.

Files Patch % Lines
cmd/thor/main.go 0.00% 4 Missing :warning:
api/api.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #777 +/- ## ========================================== - Coverage 62.62% 62.51% -0.11% ========================================== Files 199 199 Lines 18118 18140 +22 ========================================== - Hits 11346 11340 -6 - Misses 5690 5718 +28 Partials 1082 1082 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.