-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add ConvertRawTxId
, use it for comparing OneEraGenTxId
s
#1017
Conversation
instance ConvertRawTxId (GenTx ByronBlock) where | ||
toRawTxIdHash (ByronTxId i) = CC.abstractHashToShort i | ||
toRawTxIdHash (ByronDlgId i) = CC.abstractHashToShort i | ||
toRawTxIdHash (ByronUpdateProposalId i) = CC.abstractHashToShort i | ||
toRawTxIdHash (ByronUpdateVoteId i) = CC.abstractHashToShort i |
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.
This instance assumes that it is not possible for two different constructors to contain the same hash. This seems reasonable, as the payload of these different kinds of transactions are completely different. However, to be extra safe, we could eg prepend a tag byte.
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.
This seems fine, especially as Byron transactions aren't being newly submitted anymore.
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.
Rest looks good
...-consensus-diffusion/changelog.d/20240325_124036_alexander.esgen_compare_txid_on_raw_hash.md
Outdated
Show resolved
Hide resolved
883bdb7
to
539c525
Compare
539c525
to
7ba2a82
Compare
Closes #1009