-
Notifications
You must be signed in to change notification settings - Fork 217
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
Run coin selection properties with non-zero withdrawal #2014
Conversation
lib/core/test/unit/Cardano/Wallet/Primitive/CoinSelectionSpec.hs
Outdated
Show resolved
Hide resolved
01771b1
to
da30d07
Compare
da30d07
to
65c48bc
Compare
shrinkWdrl = map Quantity . shrink . getQuantity | ||
arbitrary = do | ||
utxo <- arbitrary | ||
wdrl <- Quantity <$> frequency [(65, return 0), (35, arbitrary)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
65% no withdrawal like previously
e03d29f
to
abe7916
Compare
lib/core/test/unit/Cardano/Wallet/Primitive/CoinSelectionSpec.hs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I wonder if we can add some properties, especially when withdrawal is edge case in comparison with inputs 🤔
When looking at the testing for coin selection I noticed these properties assumed withdrawal=0. By extending CoinSelProp we can also test what happens when withdrawal /= 0. They pass. I don't think there's a problem here.
abe7916
to
7d2d929
Compare
bors r+ |
2014: Run coin selection properties with non-zero withdrawal r=Anviking a=Anviking # Issue Number From looking at #2006, but surely not related. # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I added a withdrawal field to `CoinSelProp` and used it in coin selection properties # Comments - I'm not that familiar with the coin selection, but this seems like a good idea, right? <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Assign the PR to a corresponding milestone ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <[email protected]>
Timed out |
bors r+ |
Build succeeded |
Issue Number
From looking at #2006, but surely not related.
Overview
CoinSelProp
and used it in coin selection propertiesComments