Skip to content

Commit 99e5c56

Browse files
committed
fixup: Use Proxy instead of K () in blessedGenTxIdEra, add documentation for HasBlessedGenTxIdEra
1 parent 6b0312d commit 99e5c56

File tree

1 file changed

+6
-4
lines changed
  • ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation

1 file changed

+6
-4
lines changed

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs

+6-4
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@ isHardForkNodeToClientEnabled HardForkNodeToClientEnabled {} = True
214214
isHardForkNodeToClientEnabled _ = False
215215

216216

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

223225
{-------------------------------------------------------------------------------
224226
Conditions required by the HFC to support serialisation

0 commit comments

Comments
 (0)