-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow the HBar Rate Limiter to be disabled. (#3252)
* fix: Allow the HBar Rate Limiter to be disabled. Signed-off-by: Eric Badiere <[email protected]> * fix: Added acceptance test. Signed-off-by: Eric Badiere <[email protected]> * fix: Improved test by adding condition that would normally trigger rate limiting, and added isEnabled() method. Signed-off-by: Eric Badiere <[email protected]> * fix: Cleaned up and tightened test. Signed-off-by: Eric Badiere <[email protected]> * fix: Updated workflow for new tests. Signed-off-by: Eric Badiere <[email protected]> * fix: Updated comment. Signed-off-by: Eric Badiere <[email protected]> * fix: added the new hbarlimiter_batch_3 to the public_result in the workflow Signed-off-by: Eric Badiere <[email protected]> * fix: Test clean up. Signed-off-by: Eric Badiere <[email protected]> fix: clean up of experimental code. Signed-off-by: Eric Badiere <[email protected]> * fix: added isEanbled check to addExpense. Signed-off-by: Eric Badiere <[email protected]> * fix: Check totalBudget instead of remainingBudget in constructor. Signed-off-by: Eric Badiere <[email protected]> * fix: clean up. Signed-off-by: Eric Badiere <[email protected]> * 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. Signed-off-by: Eric Badiere <[email protected]> * fix: Added note around nullish coalescing operator. Signed-off-by: Eric Badiere <[email protected]> * fix: Added check for remaining budget at start of test and renamed flag to more meaningful name. Signed-off-by: Eric Badiere <[email protected]> --------- Signed-off-by: Eric Badiere <[email protected]>
- Loading branch information
1 parent
8648335
commit 0e053db
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