From eed8065b16aab750dd4a35d2cb1c49d0714aea1c Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Tue, 27 Sep 2022 22:55:59 +0800 Subject: [PATCH] remove redundant checks from the governor validator --- agora/Agora/Governor/Scripts.hs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/agora/Agora/Governor/Scripts.hs b/agora/Agora/Governor/Scripts.hs index a11af86..f5833d7 100644 --- a/agora/Agora/Governor/Scripts.hs +++ b/agora/Agora/Governor/Scripts.hs @@ -45,7 +45,6 @@ import Agora.Scripts ( stakeSTSymbol, ) import Agora.Stake ( - PProposalLock (..), PStakeDatum (..), pnumCreatedProposals, ) @@ -469,31 +468,6 @@ governorValidator as = #&& proposalOutputDatumF.timingConfig #== governorInputDatumF.proposalTimings ] - -- Check the output stake has been properly updated. - - let stakeOutputDatum = - passertPJust # "Output stake should be presented" - #$ pfindJust - # getStakeDatum - # pfromData txInfoF.outputs - - stakeOutputLocks = - pfromData $ pfield @"lockedBy" # stakeOutputDatum - - -- The stake should be locked by the newly created proposal. - newLock = - mkRecordConstr - PCreated - ( #created .= governorInputDatumF.nextProposalId - ) - - -- Append new locks to existing locks - expectedProposalLocks = - pcons # pdata newLock # stakeInputDatumF.lockedBy - - pguardC "Stake output locks correct" $ - plistEquals # stakeOutputLocks # expectedProposalLocks - pure $ popaque $ pconstant () ------------------------------------------------------------------------