Skip to content

Commit

Permalink
Not assert starting state in HeadLogicSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jul 16, 2024
1 parent 558c4fb commit 1c84c02
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions hydra-node/test/Hydra/HeadLogicSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,9 @@ spec =
}

it "waits if a requested decommit tx is not (yet) applicable" $ do
let decommitTx' = SimpleTx{txSimpleId = 1, txInputs = utxoRefs [2], txOutputs = utxoRefs [4]}
let s0 = inOpenState threeParties

s0 `shouldSatisfy` \case
(Open OpenState{coordinatedHeadState = CoordinatedHeadState{decommitTx}}) -> isNothing decommitTx
_ -> False

let reqDecEvent = receiveMessage ReqDec{transaction = decommitTx'}
let decommitTx = SimpleTx{txSimpleId = 1, txInputs = utxoRefs [2], txOutputs = utxoRefs [4]}
s0 = inOpenState threeParties
reqDecEvent = receiveMessage ReqDec{transaction = decommitTx}

update aliceEnv ledger s0 reqDecEvent
`assertWait` WaitOnNotApplicableDecommitTx (DecommitTxInvalid mempty (ValidationError "cannot apply transaction"))
Expand Down

0 comments on commit 1c84c02

Please sign in to comment.