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

The total collateral field should be a Maybe Coin #2716

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

JaredCorduan
Copy link
Contributor

The Babbage spec uses a Maybe Coin for the total collateral field of the transaction body, not a Coin, as is in the current implementation.

Using Nothing instead of zero to indicate that the total collateral field is not present in the transaction body is clearer and avoids edge cases.

Using Nothing instead of zero to indicate that the total collateral
field is not present in the transaction body is clearer and avoids edge
cases.
Copy link
Contributor

@goolord goolord left a comment

Choose a reason for hiding this comment

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

lgtm

@lehins
Copy link
Collaborator

lehins commented Mar 31, 2022

@JaredCorduan Is there (will there be) a predicate check that when _totalCollateral is SNothing, then both _collateralInputs and _collateralReturn must be mempty?

@JaredCorduan JaredCorduan merged commit 32ea434 into master Mar 31, 2022
@iohk-bors iohk-bors bot deleted the jc/maybe-collateral-total branch March 31, 2022 22:21
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.

3 participants