Skip to content

Commit

Permalink
Require reference inputs to be disjoint from regular inputs (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatisRT committed Apr 17, 2024
1 parent bda4a57 commit ea9a7fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Ledger/Utxo.lagda
Expand Up @@ -393,8 +393,8 @@ data _⊢_⇀⦇_,UTXO⦈_ where
open UTxOState s
txoutsʰ = (mapValues txOutHash txouts)
in
∙ txins ≢ ∅ ∙ txins ⊆ dom utxo
refInputs ⊆ dom utxo ∙ inInterval slot txvldt
∙ txins ≢ ∅ ∙ txins ∪ refInputs ⊆ dom utxo
txins ∩ refInputs ≡ ∅ ∙ inInterval slot txvldt
∙ feesOK pp tx utxo ≡ true ∙ consumed pp s txb ≡ produced pp s txb
∙ coin mint ≡ 0 ∙ txsize ≤ maxTxSize pp

Expand Down
4 changes: 2 additions & 2 deletions src/Ledger/hs-src/test/UtxowSpec.hs
Expand Up @@ -69,7 +69,7 @@ bodyFromSimple pp stxb = let s = 5 in MkTxBody
testTxBody1 :: TxBody
testTxBody1 = bodyFromSimple initParams $ MkSimpleTxBody
{ stxins = [(0, 0)]
, srefInputs = [(0, 0)]
, srefInputs = []
, stxouts = [ 0 .-> (a0, (890, (Nothing, Nothing)))
, 1 .-> (a1, (100, (Nothing, Nothing))) ]
, stxvldt = (Nothing, Just 10)
Expand All @@ -85,7 +85,7 @@ testTx1 = MkTx
testTxBody2 :: TxBody
testTxBody2 = bodyFromSimple initParams $ MkSimpleTxBody
{ stxins = [(1, 1)]
, srefInputs = [(1, 1)]
, srefInputs = [(1, 0)]
, stxouts = [ 0 .-> (a2, (10, (Nothing, Nothing)))
, 1 .-> (a1, (80, (Nothing, Nothing))) ]
, stxvldt = (Nothing, Just 10)
Expand Down

0 comments on commit ea9a7fb

Please sign in to comment.