Skip to content

Commit

Permalink
fixup: Use Proxy instead of K () in blessedGenTxIdEra, add document…
Browse files Browse the repository at this point in the history
…ation for `HasBlessedGenTxIdEra`
  • Loading branch information
fraser-iohk committed Dec 12, 2024
1 parent 044116e commit 2cd30dc
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ isHardForkNodeToClientEnabled HardForkNodeToClientEnabled {} = True
isHardForkNodeToClientEnabled _ = False


-- absolutely horrible. should be HasLatestStableGenTxIdEra probably.
-- especially nasty because it's a K () rather than an equivalent (but
-- non-existent) 'Void :: (Type -> Type) -> Type'
-- | 'HasBlessedGenTxIdEra' is used solely for backwards-compatibility reasons
-- for when we're communicating with older node / client versions and need to
-- serialise / deserialise era-tagged 'GenTxId's. The 'blessedGenTxIdEra' is
-- used as the "default" era tag when we want to send a (non-era-tagged)
-- 'GenTxId' to these nodes / clients.
class HasBlessedGenTxIdEra (xs :: [Type]) where
blessedGenTxIdEra :: NS (K ()) xs
blessedGenTxIdEra :: NS Proxy xs

{-------------------------------------------------------------------------------
Conditions required by the HFC to support serialisation
Expand Down

0 comments on commit 2cd30dc

Please sign in to comment.