feat: Add Unit Specific Limits
This PR introduces functionality to set unit-specific limits for:
- PEG_INS
- PEG_OUTS
- MAX_BALANCE
This is awesome thank you. Can we use the opportunity to rename these flags to "max mint" and "max melt" instead of peg-in and peg-out? this is old baggage that I wanted to get rid of for a while
Calling crud.get_balance should be discouraged because the view takes a very long time to query on sqlite if the database gets moderately large. Instead, since https://github.com/cashubtc/nutshell/pull/705 there is a balance for each keyset that is being tracked which should be pretty much instant to get.
Codecov Report
:x: Patch coverage is 71.05263% with 22 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 60.78%. Comparing base (15ec97b) to head (9fc26b6).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| cashu/mint/features.py | 8.33% | 11 Missing :warning: |
| cashu/mint/verification.py | 81.96% | 11 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #740 +/- ##
==========================================
- Coverage 61.10% 60.78% -0.32%
==========================================
Files 89 89
Lines 10565 10622 +57
==========================================
+ Hits 6456 6457 +1
- Misses 4109 4165 +56
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.