Skip to content

Commit c46c716

Browse files
committed
Simplify serialization of ApplyTxError
1 parent ba5addb commit c46c716

File tree

1 file changed

+1
-19
lines changed
  • eras/shelley/impl/src/Cardano/Ledger/Shelley/API

1 file changed

+1
-19
lines changed

eras/shelley/impl/src/Cardano/Ledger/Shelley/API/Mempool.hs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ import Cardano.Ledger.Binary (
4444
EncCBOR (..),
4545
FromCBOR (..),
4646
ToCBOR (..),
47-
encodeFoldableAsIndefLenList,
48-
ifEncodingVersionAtLeast,
49-
natVersion,
5047
)
5148
import Cardano.Ledger.Core
5249
import Cardano.Ledger.Rules.ValidationMode (lblStatic)
@@ -201,26 +198,11 @@ deriving stock instance
201198
Show (PredicateFailure (EraRule "LEDGER" era)) =>
202199
Show (ApplyTxError era)
203200

204-
-- TODO: This instance can be switched back to a derived version, once we are officially
205-
-- in the Conway era:
206-
--
207-
-- deriving newtype instance
208-
-- ( Era era
209-
-- , EncCBOR (PredicateFailure (EraRule "LEDGER" era))
210-
-- ) =>
211-
-- EncCBOR (ApplyTxError era)
212-
213-
instance
201+
deriving newtype instance
214202
( Era era
215203
, EncCBOR (PredicateFailure (EraRule "LEDGER" era))
216204
) =>
217205
EncCBOR (ApplyTxError era)
218-
where
219-
encCBOR (ApplyTxError failures) =
220-
ifEncodingVersionAtLeast
221-
(natVersion @9)
222-
(encCBOR failures)
223-
(encodeFoldableAsIndefLenList encCBOR failures)
224206

225207
deriving newtype instance
226208
( Era era

0 commit comments

Comments
 (0)