Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2897: Unify `selectionDelta` calculations. r=jonathanknowles a=jonathanknowles ## Issue Number ADP-1070 ## Summary This PR: - introduces the `SelectionDelta` type, which encodes the possibility of: - a `SelectionSurplus` (where all output assets are paid for by the inputs) - a `SelectionDeficit` (where some output assets are not paid for by the inputs) - introduces the `selectionDelta{AllAssets,Coin}` functions, which compute the selection delta for all assets, or just the ada asset, respectively. - uses the `selectionDelta{AllAssets,Coin}` functions to unify several repeated calculations relating to deltas, including within the test suite. Co-authored-by: Jonathan Knowles <jonathan.knowles@iohk.io>
- Loading branch information
Showing
5 changed files
with
175 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.