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

Generalize UTxO identifiers and addresses in coin selection Gen modules. #3174

Merged

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Mar 16, 2022

Issue Number

ADP-1523

Summary

This PR removes the dependency on Address and WalletUTxO from the following modules:

  • Cardano.Wallet.CoinSelection.Internal.Balance.Gen
  • Cardano.Wallet.Primitive.Types.UTxOIndex.Gen
  • Cardano.Wallet.Primitive.Types.UTxOSelection.Gen

It moves all generators and shrinkers for WalletUTxO to a new module:

  • Cardano.Wallet.CoinSelection.Gen

Future Work

In the long run we should be able to remove module Cardano.Wallet.CoinSelection.Gen, as the coin selection test suite will eventually use its own test types for addresses and UTxO identifiers.

But for now, we use this module as a way to minimize duplication.

@jonathanknowles jonathanknowles self-assigned this Mar 16, 2022
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/generalize-coin-selection-generators-shrinkers branch 4 times, most recently from 95c4e05 to 28dabdd Compare March 17, 2022 05:40
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/generalize-coin-selection-generators-shrinkers branch from 28dabdd to 37b7f4d Compare March 18, 2022 00:17
Copy link
Contributor

@sevanspowell sevanspowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

…coin-selection-property-tests

Add property tests for conversion functions in `Wallet.CoinSelection`.
@jonathanknowles
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Mar 18, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 4e147fc into master Mar 18, 2022
@iohk-bors iohk-bors bot deleted the jonathanknowles/generalize-coin-selection-generators-shrinkers branch March 18, 2022 05:36
WilliamKingNoel-Bot pushed a commit that referenced this pull request Mar 18, 2022
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