nutshell icon indicating copy to clipboard operation
nutshell copied to clipboard

feat: Add Unit Specific Limits

Open cloudsupper opened this issue 8 months ago • 3 comments

This PR introduces functionality to set unit-specific limits for:

  • PEG_INS
  • PEG_OUTS
  • MAX_BALANCE

cloudsupper avatar May 08 '25 11:05 cloudsupper

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

callebtc avatar May 10 '25 10:05 callebtc

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.

callebtc avatar May 11 '25 18:05 callebtc

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.

codecov[bot] avatar Sep 30 '25 09:09 codecov[bot]