diff --git a/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules/Utxo.hs b/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules/Utxo.hs index faf1334706c..2e32e95d15e 100644 --- a/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules/Utxo.hs +++ b/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Rules/Utxo.hs @@ -22,6 +22,7 @@ import Cardano.Ledger.Shelley (ShelleyBased) import Cardano.Ledger.ShelleyMA (MaryOrAllegra, ShelleyMAEra) import Cardano.Ledger.ShelleyMA.Timelocks import Cardano.Ledger.ShelleyMA.TxBody (TxBody) +import Cardano.Ledger.Torsor (Torsor (..)) import qualified Cardano.Ledger.Val as Val import Cardano.Slotting.Slot (SlotNo) import Control.Iterate.SetAlgebra (dom, eval, (∪), (⊆), (⋪), (◁)) @@ -93,8 +94,8 @@ data UtxoPredicateFailure era !Coin -- the minimum fee for this transaction !Coin -- the fee supplied in this transaction | ValueNotConservedUTxO - !(Core.Value era) -- the Coin consumed by this transaction - !(Core.Value era) -- the Coin produced by this transaction + !(Delta (Core.Value era)) -- the Coin consumed by this transaction + !(Delta (Core.Value era)) -- the Coin produced by this transaction | WrongNetwork !Network -- the expected network id !(Set (Addr era)) -- the set of addresses with incorrect network IDs @@ -117,7 +118,7 @@ deriving stock instance ShelleyBased era => Eq (UtxoPredicateFailure era) -instance NoThunks (Core.Value era) => NoThunks (UtxoPredicateFailure era) +instance NoThunks (Delta (Core.Value era)) => NoThunks (UtxoPredicateFailure era) -- | Calculate the value consumed by the transation. -- @@ -204,7 +205,7 @@ utxoTransition = do let consumed_ = consumed pp utxo txb produced_ = Shelley.produced pp stakepools txb - consumed_ == produced_ ?! ValueNotConservedUTxO consumed_ produced_ + consumed_ == produced_ ?! ValueNotConservedUTxO (toDelta consumed_) (toDelta produced_) -- process Protocol Parameter Update Proposals ppup' <- trans @(PPUP era) $ TRC (PPUPEnv slot pp genDelegs, ppup, txup tx)