-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: implement preemptive rate limitting logic to HbarLimitService class #2950
feat: implement preemptive rate limitting logic to HbarLimitService class #2950
Conversation
packages/relay/src/lib/services/hbarLimitService/IHbarLimitService.ts
Outdated
Show resolved
Hide resolved
packages/relay/src/lib/services/hbarLimitService/IHbarLimitService.ts
Outdated
Show resolved
Hide resolved
d3fe68c
to
a60a80b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few things
packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts
Outdated
Show resolved
Hide resolved
packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts
Show resolved
Hide resolved
packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts
Outdated
Show resolved
Hide resolved
packages/relay/src/lib/services/hbarLimitService/IHbarLimitService.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG.
86afa7a
to
336d55b
Compare
…vice class Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
daa961b
to
da4d324
Compare
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2950 +/- ##
==========================================
- Coverage 89.64% 89.54% -0.11%
==========================================
Files 40 56 +16
Lines 3080 3796 +716
Branches 633 775 +142
==========================================
+ Hits 2761 3399 +638
- Misses 275 350 +75
- Partials 44 47 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
This PR implements the preemptive rate-limiting logic in
HbarLimitService.shouldLimit()
by comparing the total expenses with the estimated transaction fee.Fixes #2937