Skip to content

Commit

Permalink
Add review comment and eta-reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Mar 17, 2023
1 parent 98e9ef2 commit 06fd2fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hydra-node/exe/hydra-node/Main.hs
Expand Up @@ -127,6 +127,7 @@ main = do
action (Ledger.cardanoLedger globals ledgerEnv)

-- check if hydra-node parameters are matching with the hydra-node state.
-- REVIEW: Should we also check against items we receive on-chain here? e.g. 'OpenThreadOutput' if in Open state?
checkParamsAgainstExistingState :: HeadState Ledger.Tx -> Environment -> [String]
checkParamsAgainstExistingState hs env =
case hs of
Expand All @@ -138,9 +139,9 @@ main = do
validateParameters st params =
let res = flip execState [] $ do
when (Hydra.Chain.contestationPeriod params /= cp) $
modify (\s -> s <> ["Contestation period does not match. "])
modify (<> ["Contestation period does not match. "])
when (sort (Hydra.Chain.parties params) /= sort envParties) $
modify (\s -> s <> ["Parties mismatch. "])
modify (<> ["Parties mismatch. "])
in case res of
[] -> []
items -> st : items
Expand Down

0 comments on commit 06fd2fe

Please sign in to comment.