@@ -123,8 +123,6 @@ newtype OneEraEnvelopeErr xs = OneEraEnvelopeErr { getOneEra
123
123
newtype OneEraForgeStateInfo xs = OneEraForgeStateInfo { getOneEraForgeStateInfo :: NS WrapForgeStateInfo xs }
124
124
newtype OneEraForgeStateUpdateError xs = OneEraForgeStateUpdateError { getOneEraForgeStateUpdateError :: NS WrapForgeStateUpdateError xs }
125
125
newtype OneEraGenTx xs = OneEraGenTx { getOneEraGenTx :: NS GenTx xs }
126
- newtype OneEraGenTxId xs = OneEraGenTxId { getOneEraGenTxId :: ShortByteString }
127
- deriving (Show , Eq , Ord , Generic , NoThunks )
128
126
newtype OneEraHeader xs = OneEraHeader { getOneEraHeader :: NS Header xs }
129
127
newtype OneEraIsLeader xs = OneEraIsLeader { getOneEraIsLeader :: NS WrapIsLeader xs }
130
128
newtype OneEraLedgerError xs = OneEraLedgerError { getOneEraLedgerError :: NS WrapLedgerErr xs }
@@ -159,6 +157,22 @@ instance Show (OneEraHash xs) where
159
157
instance Condense (OneEraHash xs ) where
160
158
condense = show
161
159
160
+ {- ------------------------------------------------------------------------------
161
+ GenTxId
162
+ -------------------------------------------------------------------------------}
163
+
164
+ -- | The GenTxId for an era
165
+ --
166
+ -- This type is special in effectively the same way as OneEraHash (and for
167
+ -- basically the same reason, too) -- it doesn't use an NS, because we don't
168
+ -- want to be able to differentiate eras' 'GenTxId's. Ideally, 'OneEraGenTxId'
169
+ -- would be serialised simply as a 'ShortByteString', but for backwards
170
+ -- compatibility reasons we /pretend/ that it's always a Shelley-era 'GenTxId'
171
+ -- when we're communicating with other nodes or clients that don't support the
172
+ -- new serialisation format.
173
+ newtype OneEraGenTxId xs = OneEraGenTxId { getOneEraGenTxId :: ShortByteString }
174
+ deriving (Show , Eq , Ord , Generic , NoThunks )
175
+
162
176
{- ------------------------------------------------------------------------------
163
177
Value for two /different/ eras
164
178
-------------------------------------------------------------------------------}
0 commit comments