core-wallet | Add proptests to notes #3309
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add proptests to notes
proptest
toCargo.toml
FromIterator<(BlsScalar, NoteLeaf)> for NoteList
but keep the existing currentFrom<Vec<(BlsScalar, NoteLeaf)>> for NoteList
implementation for backward compatibilitytest_balance_calculation_properties
property testTests the balance calculation functionality ensuring that:
MAX_INPUT_NOTES
), spendable equals totalMAX_INPUT_NOTES
highest value notestest_note_picking_properties
property testTests note picking behavior:
MAX_INPUT_NOTES
highest value notes can't cover targetMAX_INPUT_NOTES
, returns all notespick_lexicographic
to find valid combinationtest_note_picking_lexicographic_order
property testTests that note picking follows lexicographic ordering of indices when selecting notes from larger set:
MAX_INPUT_NOTES
largest notes can't cover targetMAX_INPUT_NOTES
test_note_picking_duplicate_values
property testTests note picking behavior with duplicate value notes:
MAX_INPUT_NOTES * value
MAX_INPUT_NOTES
test_note_picking_max_input_boundary
property testTests note picking behavior at
MAX_INPUT_NOTES
boundary conditions:MAX_INPUT_NOTES
boundarytest_note_picking_minimal_differences
property testTests note picking implementation's core behavior with minimal value differences:
MAX_INPUT_NOTES
(returns all)MAX_INPUT_NOTES
largest notes can't cover target (returns empty)MAX_INPUT_NOTES
notes[0,1,2,3]
,[0,1,2,4]
, etc.test_note_picking_extreme_distributions
property testTests note picking with extreme value distributions:
test_note_picking_target_boundaries
property testTests note picking with specific target edge cases:
MAX_INPUT_NOTES
largest notestest_note_picking_degenerate_cases
property testTests note picking with degenerate inputs: