Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] add limit batch request for web3 API #3822

Merged
merged 4 commits into from
Mar 21, 2023

Conversation

millken
Copy link
Contributor

@millken millken commented Mar 15, 2023

Description

add limit for batch request,DefaultBatchRequestLimit = 100, when the batch size exceeds the threshold, an error batch too large will be returned.

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

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

  • make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #3822 (1db1d6d) into master (e1f0636) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 1db1d6d differs from pull request most recent head 63b199b. Consider uploading reports for the commit 63b199b to get more accurate results

@@           Coverage Diff           @@
##           master    #3822   +/-   ##
=======================================
  Coverage   75.38%   75.39%           
=======================================
  Files         303      303           
  Lines       25923    25933   +10     
=======================================
+ Hits        19541    19551   +10     
  Misses       5360     5360           
  Partials     1022     1022           
Impacted Files Coverage Δ
api/serverV2.go 86.95% <100.00%> (ø)
api/web3server.go 79.04% <100.00%> (+0.37%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

api/web3server.go Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Mar 21, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
10.4% 10.4% Duplication

@millken millken merged commit a191478 into iotexproject:master Mar 21, 2023
@millken millken deleted the limitbatchrequest branch March 21, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants