Skip to content

Commit 4a9594f

Browse files
committed
Remove MemoBytes from ShelleyTx
1 parent 82c3d9b commit 4a9594f

File tree

8 files changed

+126
-270
lines changed

8 files changed

+126
-270
lines changed

eras/shelley/impl/src/Cardano/Ledger/Shelley/BlockChain.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Cardano.Ledger.BaseTypes (
3333
BlocksMade (..),
3434
Nonce (..),
3535
StrictMaybe (..),
36+
maybeToStrictMaybe,
3637
mkNonceFromNumber,
3738
strictMaybeToMaybe,
3839
)
@@ -50,7 +51,7 @@ import Cardano.Ledger.Binary (
5051
)
5152
import Cardano.Ledger.Core
5253
import Cardano.Ledger.Shelley.Era (ShelleyEra)
53-
import Cardano.Ledger.Shelley.Tx (ShelleyTx, segWitTx)
54+
import Cardano.Ledger.Shelley.Tx (ShelleyTx (..))
5455
import Cardano.Ledger.Slot (SlotNo (..))
5556
import Control.Monad (unless)
5657
import Data.ByteString (ByteString)
@@ -225,7 +226,7 @@ instance EraTx era => DecCBOR (ShelleyTxSeq era) where
225226
)
226227
let txs =
227228
StrictSeq.forceToStrict $
228-
Seq.zipWith3 segWitTx bodies wits auxData
229+
Seq.zipWith3 ShelleyTx bodies wits (maybeToStrictMaybe <$> auxData)
229230
pure $ TxSeq' txs bodiesBytes witsBytes auxDataBytes
230231

231232
slotToNonce :: SlotNo -> Nonce

eras/shelley/impl/src/Cardano/Ledger/Shelley/Tx.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
module Cardano.Ledger.Shelley.Tx (
22
-- * Transaction
3-
ShelleyTx (
4-
MkShelleyTx,
5-
ShelleyTx,
6-
body,
7-
wits,
8-
auxiliaryData
9-
),
10-
ShelleyTxRaw (..),
3+
ShelleyTx (..),
114
bodyShelleyTxL,
125
witsShelleyTxL,
136
auxDataShelleyTxL,
147
sizeShelleyTxF,
158
wireSizeShelleyTxF,
16-
segWitTx,
179
mkBasicShelleyTx,
1810
shelleyMinFeeTx,
1911
witsFromTxWitnesses,

0 commit comments

Comments
 (0)