Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fundamental properties of CoinSelection.performSelection. #2953

Merged
merged 15 commits into from
Oct 7, 2021

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Oct 7, 2021

Issue number

ADP-1037

Summary

This PR tests fundamental properties of the CoinSelection.performSelection function.

Details

In the case where performSelection successfully produces a Selection s for a given set of SelectionConstraints cs and SelectionParams ps, we verify that the following properties hold:

  • selectionHasSufficientCollateral cs ps s
  • selectionHasValidSurplus cs ps s

Not included in this PR

This PR doesn't include:

  • tests that verify the failure cases of performSelection
  • tests that verify the minimum collateral amount calculation.

These tests will be included in future PRs.

The generators and shrinkers in this module are for types defined in the
`Balance` module.
@jonathanknowles jonathanknowles self-assigned this Oct 7, 2021
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/adp-1037/test-coin-selection branch from 0bb5bd7 to 642b24c Compare October 7, 2021 03:52
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/adp-1037/test-coin-selection branch from 87082b4 to 4f5e341 Compare October 7, 2021 03:55
@jonathanknowles jonathanknowles marked this pull request as ready for review October 7, 2021 05:14
@jonathanknowles
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 7, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 72bff1a into master Oct 7, 2021
@iohk-bors iohk-bors bot deleted the jonathanknowles/adp-1037/test-coin-selection branch October 7, 2021 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants