From 3ecb6a351d23e055a97b2466ec6a6bd912cd6135 Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Fri, 17 Jun 2022 23:36:44 +0800 Subject: [PATCH] fix some typo --- agora-specs/Sample/Proposal.hs | 16 ++++++++-------- agora-specs/Spec/Proposal.hs | 4 ++-- agora/Agora/Proposal/Scripts.hs | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/agora-specs/Sample/Proposal.hs b/agora-specs/Sample/Proposal.hs index 25c3fb4..3aa30c7 100644 --- a/agora-specs/Sample/Proposal.hs +++ b/agora-specs/Sample/Proposal.hs @@ -16,9 +16,9 @@ module Sample.Proposal ( advanceProposalSuccess, advanceProposalFailureTimeout, TransitionParameters (..), - advanceFinishedPropsoal, + advanceFinishedProposal, advanceProposalInsufficientVotes, - advancePropsoalWithInvalidOutputStake, + advanceProposalWithInvalidOutputStake, ) where import Agora.Governor (GovernorDatum (..)) @@ -374,9 +374,9 @@ voteOnProposal params = -- | Parameters for state transition of proposals. data TransitionParameters = TransitionParameters - { -- The initial status of the propsoal. + { -- The initial status of the proposal. initialProposalStatus :: ProposalStatus - , -- The starting time of the propsoal. + , -- The starting time of the proposal. proposalStartingTime :: ProposalStartingTime } @@ -684,8 +684,8 @@ advanceProposalInsufficientVotes = True -- | An invalid 'TxInfo' that tries to advance a 'Finished' proposal. -advanceFinishedPropsoal :: TxInfo -advanceFinishedPropsoal = +advanceFinishedProposal :: TxInfo +advanceFinishedProposal = let effects = AssocMap.fromList [ (ResultTag 0, AssocMap.empty) @@ -720,8 +720,8 @@ advanceFinishedPropsoal = From the perspective of stake validator, the transition is totally valid, so the proposal validator should reject this. -} -advancePropsoalWithInvalidOutputStake :: TxInfo -advancePropsoalWithInvalidOutputStake = +advanceProposalWithInvalidOutputStake :: TxInfo +advanceProposalWithInvalidOutputStake = let templateTxInfo = advanceProposalSuccess' TransitionParameters diff --git a/agora-specs/Spec/Proposal.hs b/agora-specs/Spec/Proposal.hs index 9381eb5..c6ba3e3 100644 --- a/agora-specs/Spec/Proposal.hs +++ b/agora-specs/Spec/Proposal.hs @@ -308,7 +308,7 @@ specs = ) AdvanceProposal ( ScriptContext - Proposal.advanceFinishedPropsoal + Proposal.advanceFinishedProposal (Spending Proposal.proposalRef) ) , validatorFailsWith @@ -337,7 +337,7 @@ specs = ) AdvanceProposal ( ScriptContext - Proposal.advancePropsoalWithInvalidOutputStake + Proposal.advanceProposalWithInvalidOutputStake (Spending Proposal.proposalRef) ) ] diff --git a/agora/Agora/Proposal/Scripts.hs b/agora/Agora/Proposal/Scripts.hs index a8d3c0f..c560e1b 100644 --- a/agora/Agora/Proposal/Scripts.hs +++ b/agora/Agora/Proposal/Scripts.hs @@ -287,7 +287,7 @@ proposalValidator proposal = pisJust #$ plookup # voteFor # voteMap -- Ensure that no lock with the current proposal id has been put on the stake. - pguardC "Same stake shouldn't vote on the same propsoal twice" $ + pguardC "Same stake shouldn't vote on the same proposal twice" $ pnot #$ pany # plam ( \((pfield @"proposalTag" #) . pfromData -> pid) -> @@ -404,7 +404,7 @@ proposalValidator proposal = -------------------------------------------------------------------------- PUnlock r -> unTermCont $ do -- At draft stage, the votes should be empty. - pguardC "Shouldn't retract votes from a draft propsoal" $ + pguardC "Shouldn't retract votes from a draft proposal" $ pnot #$ proposalF.status #== pconstantData Draft -- This is the vote option we're retracting from.