Skip to content

Commit

Permalink
[ADP-3272] Simplify guard name to guardUTxOConsistency. (#4532)
Browse files Browse the repository at this point in the history
## Issue

ADP-3272
Follow-on from
#4531

## Description

This PR revises the name of a guard to better reflect its type.
  • Loading branch information
jonathanknowles authored Apr 12, 2024
2 parents 3883bc5 + b1b3ebb commit 9fe7ed5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment
guardExistingCollateral
guardExistingTotalCollateral
guardExistingReturnCollateral
guardWalletUTxOConsistencyWith
guardUTxOConsistency

(balance0, minfee0, _) <- balanceAfterSettingMinFee (partialTx ^. #tx)

Expand Down Expand Up @@ -861,13 +861,13 @@ balanceTransactionWithSelectionStrategyAndNoZeroAdaAdjustment
minfee' = Convert.toLedgerCoin minfee
return (balance, minfee', witCount)

-- | Ensures the wallet UTxO set is consistent with the given UTxO set.
-- | Ensures that the given UTxO sets are consistent with one another.
--
-- They are not consistent iff an input can be looked up in both UTxO sets
-- with different @Address@, or @TokenBundle@ values.
--
guardWalletUTxOConsistencyWith :: ExceptT (ErrBalanceTx era) m ()
guardWalletUTxOConsistencyWith =
guardUTxOConsistency :: ExceptT (ErrBalanceTx era) m ()
guardUTxOConsistency =
case NE.nonEmpty (F.toList (conflicts extraUTxO walletLedgerUTxO)) of
Just cs -> throwE $ ErrBalanceTxInputResolutionConflicts cs
Nothing -> return ()
Expand Down

0 comments on commit 9fe7ed5

Please sign in to comment.