Skip to content

Commit

Permalink
Changed the raising of BadInputsUTxO to be less expensive.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSheard committed Oct 27, 2020
1 parent 859daca commit 99f92f2
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -14,6 +14,7 @@

module Shelley.Spec.Ledger.STS.Utxo
( UTXO,
unUTxO,
UtxoEnv (..),
UtxoPredicateFailure (..),
PredicateFailure,
Expand Down Expand Up @@ -285,7 +286,8 @@ utxoInductive = do
txFee = _txfee txb
minFee <= txFee ?! FeeTooSmallUTxO minFee txFee

eval (txins txb dom utxo) ?! BadInputsUTxO (txins txb `Set.difference` eval (dom utxo))
eval (txins txb dom utxo) ?! BadInputsUTxO (Set.filter (\ x -> not(Map.member x (unUTxO utxo))) (txins txb))
-- (txins txb `Set.difference` eval (dom utxo))

ni <- liftSTS $ asks networkId
let addrsWrongNetwork =
Expand Down

0 comments on commit 99f92f2

Please sign in to comment.