Skip to content

Commit 2cd30dc

Browse files
committed
fixup: Use Proxy instead of K () in blessedGenTxIdEra, add documentation for HasBlessedGenTxIdEra
1 parent 044116e commit 2cd30dc

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,13 @@ isHardForkNodeToClientEnabled HardForkNodeToClientEnabled {} = True
219219
isHardForkNodeToClientEnabled _ = False
220220

221221

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

228230
{-------------------------------------------------------------------------------
229231
Conditions required by the HFC to support serialisation

0 commit comments

Comments
 (0)