Skip to content

Commit 602bda5

Browse files
Soupstrawlehins
andauthored
Update eras/shelley/impl/src/Cardano/Ledger/Shelley/Tx.hs
Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
1 parent 6960a76 commit 602bda5

File tree

1 file changed

+2
-2
lines changed
  • eras/shelley/impl/src/Cardano/Ledger/Shelley

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ toCBORForSizeComputation ShelleyTx {stBody, stWits, stAuxData} =
145145
<> encodeNullStrictMaybe encCBOR stAuxData
146146

147147
-- | txsize computes the length of the serialised bytes (for estimations)
148-
sizeShelleyTxF :: forall era. EraTx era => SimpleGetter (ShelleyTx era) Word32
148+
sizeShelleyTxF :: forall era. EraTx era => (HasCallStack, SimpleGetter (ShelleyTx era)) Word32
149149
sizeShelleyTxF =
150150
to $
151-
fromIntegral
151+
errorFail $ integralToBounded @Word64 @Word32
152152
. LBS.length
153153
. serialize (eraProtVerLow @era)
154154
. toCBORForSizeComputation

0 commit comments

Comments
 (0)