From 06fd2fe95c766bd5db342bd8fd5e671e03d136a4 Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Thu, 9 Mar 2023 12:36:02 +0100 Subject: [PATCH] Add review comment and eta-reduce --- hydra-node/exe/hydra-node/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hydra-node/exe/hydra-node/Main.hs b/hydra-node/exe/hydra-node/Main.hs index a330d167381..32cd40a6b1c 100644 --- a/hydra-node/exe/hydra-node/Main.hs +++ b/hydra-node/exe/hydra-node/Main.hs @@ -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 @@ -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