-
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
Verify coin selection balancing errors. #2993
Verify coin selection balancing errors. #2993
Conversation
Use these functions to make several verification functions more concise.
Use this function to make several verification functions more concise.
ae4cb23
to
6bea6b8
Compare
6bea6b8
to
98bdb29
Compare
-- | ||
resultWithMinimalConstraints :: Either SelectionError Selection | ||
resultWithMinimalConstraints = | ||
runIdentity $ runExceptT $ performSelection cs' ps |
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.
runIdentity $ runExceptT $ performSelection cs' ps | |
-- By using our Identity instance of MonadRandom, we always generate the | |
-- same number. This means we'll always pick the same numbered entry in | |
-- our UTxO set. This isn't an issue however, because when we select | |
-- elements from the UTxO set, we remove them, so we won't always select | |
-- the same input. | |
runIdentity $ runExceptT $ performSelection cs' ps |
What do you think of this?
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.
It's an excellent suggestion: I'll add it in!
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.
Fixed in 7e8aced.
In response to review feedback: #2993 (comment)
We move main types to the top of the module, so that they appear right next to the `performSelection` function.
bors r+ |
Build succeeded: |
Issue Number
ADP-1037
Summary
This PR finalizes the verification of selection balancing errors returned from
CoinSelection.performSelection
.Details
This PR:
EmptyUTxO
.BalanceInsufficientError
.InsufficientMinCoinValueError
.UnableToConstructChangeError
.