-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: Allow the HBar Rate Limiter to be disabled. (#3252) * fix: Allow the HBar Rate Limiter to be disabled. * fix: Added acceptance test. * fix: Improved test by adding condition that would normally trigger rate limiting, and added isEnabled() method. * fix: Cleaned up and tightened test. * fix: Updated workflow for new tests. * fix: Updated comment. * fix: added the new hbarlimiter_batch_3 to the public_result in the workflow * fix: Test clean up. fix: clean up of experimental code. * fix: added isEanbled check to addExpense. * fix: Check totalBudget instead of remainingBudget in constructor. * fix: clean up. * fix: Test fix. Now that the addExpense is also skipped when the HBar Rate Limiter is disabled the test should not use the expenses aggregated to determine if the maxSpendingLimit has been passed, but simply use the relay operator's before and after balances. * fix: Added note around nullish coalescing operator. * fix: Added check for remaining budget at start of test and renamed flag to more meaningful name. --------- Signed-off-by: Eric Badiere <[email protected]> Co-authored-by: Eric Badiere <[email protected]>
- Loading branch information
1 parent
8648335
commit 6a9acb2
Showing
7 changed files
with
143 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters