Skip to content

Commit

Permalink
Use skeleton for arguments of type TxSkeleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Apr 30, 2021
1 parent 8f7b7b3 commit 04e9013
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ mkTxSkeleton witness context skeleton = TxSkeleton
-- | Estimates the final cost of a transaction based on its skeleton.
--
estimateTxCost :: ProtocolParameters -> TxSkeleton -> Coin
estimateTxCost pp args =
computeFee $ estimateTxSize args
estimateTxCost pp skeleton =
computeFee $ estimateTxSize skeleton
where
LinearFee (Quantity a) (Quantity b) = getFeePolicy $ txParameters pp

Expand All @@ -714,7 +714,7 @@ estimateTxCost pp args =
-- https://github.com/input-output-hk/cardano-ledger-specs/blob/master/shelley/chain-and-ledger/shelley-spec-ledger-test/cddl-files/shelley.cddl
--
estimateTxSize :: TxSkeleton -> TxSize
estimateTxSize args =
estimateTxSize skeleton =
TxSize $ fromIntegral sizeOf_Transaction
where
TxSkeleton
Expand All @@ -725,7 +725,7 @@ estimateTxSize args =
, txInputCount
, txOutputs
, txChange
} = args
} = skeleton

numberOf_Inputs
= fromIntegral txInputCount
Expand Down

0 comments on commit 04e9013

Please sign in to comment.