@@ -17,9 +17,10 @@ module Test.Cardano.Ledger.Dijkstra.TreeDiff (
1717) where
1818
1919import Cardano.Crypto.DSIGN (rawSerialiseSigDSIGN )
20- import Cardano.Crypto.Leios (LeiosCert (.. ), bitFieldToBytes )
20+ import Cardano.Crypto.Leios (LeiosCert (.. ), encodeBitField )
2121import Cardano.Ledger.Alonzo.Plutus.Context (ContextError )
2222import Cardano.Ledger.BaseTypes (StrictMaybe )
23+ import Cardano.Ledger.Binary.Plain (serialize )
2324import qualified Cardano.Ledger.Conway.Rules as Conway
2425import Cardano.Ledger.Dijkstra (DijkstraEra )
2526import Cardano.Ledger.Dijkstra.BlockBody (PerasCert )
@@ -132,12 +133,14 @@ instance ToExpr (TxBody l DijkstraEra)
132133instance ToExpr PerasCert
133134
134135-- Manual ToExpr to avoid an orphan 'ToExpr (SigDSIGN BLS12381MinSigDSIGN)':
135- -- show the BLS signature as its raw byte representation.
136+ -- show the BLS signature as its raw byte representation, and the bitfield
137+ -- as its CBOR encoding (since the wire-format bytes aren't separately
138+ -- observable through the public API).
136139instance ToExpr LeiosCert where
137140 toExpr cert =
138141 Rec " LeiosCert" $
139142 OMap. fromList
140- [ (" signers" , toExpr (bitFieldToBytes $ signers cert))
143+ [ (" signers" , toExpr (serialize (encodeBitField ( signers cert)) ))
141144 , (" aggregatedSignature" , toExpr (rawSerialiseSigDSIGN $ aggregatedSignature cert))
142145 ]
143146
0 commit comments