fix some typo

This commit is contained in:
Hongrui Fang 2022-06-17 23:36:44 +08:00
parent dd2fae059f
commit 2f46594fe7
3 changed files with 12 additions and 12 deletions

View file

@ -16,9 +16,9 @@ module Sample.Proposal (
advanceProposalSuccess, advanceProposalSuccess,
advanceProposalFailureTimeout, advanceProposalFailureTimeout,
TransitionParameters (..), TransitionParameters (..),
advanceFinishedPropsoal, advanceFinishedProposal,
advanceProposalInsufficientVotes, advanceProposalInsufficientVotes,
advancePropsoalWithInvalidOutputStake, advanceProposalWithInvalidOutputStake,
) where ) where
import Agora.Governor (GovernorDatum (..)) import Agora.Governor (GovernorDatum (..))
@ -374,9 +374,9 @@ voteOnProposal params =
-- | Parameters for state transition of proposals. -- | Parameters for state transition of proposals.
data TransitionParameters = TransitionParameters data TransitionParameters = TransitionParameters
{ -- The initial status of the propsoal. { -- The initial status of the proposal.
initialProposalStatus :: ProposalStatus initialProposalStatus :: ProposalStatus
, -- The starting time of the propsoal. , -- The starting time of the proposal.
proposalStartingTime :: ProposalStartingTime proposalStartingTime :: ProposalStartingTime
} }
@ -684,8 +684,8 @@ advanceProposalInsufficientVotes =
True True
-- | An invalid 'TxInfo' that tries to advance a 'Finished' proposal. -- | An invalid 'TxInfo' that tries to advance a 'Finished' proposal.
advanceFinishedPropsoal :: TxInfo advanceFinishedProposal :: TxInfo
advanceFinishedPropsoal = advanceFinishedProposal =
let effects = let effects =
AssocMap.fromList AssocMap.fromList
[ (ResultTag 0, AssocMap.empty) [ (ResultTag 0, AssocMap.empty)
@ -720,8 +720,8 @@ advanceFinishedPropsoal =
From the perspective of stake validator, the transition is totally valid, From the perspective of stake validator, the transition is totally valid,
so the proposal validator should reject this. so the proposal validator should reject this.
-} -}
advancePropsoalWithInvalidOutputStake :: TxInfo advanceProposalWithInvalidOutputStake :: TxInfo
advancePropsoalWithInvalidOutputStake = advanceProposalWithInvalidOutputStake =
let templateTxInfo = let templateTxInfo =
advanceProposalSuccess' advanceProposalSuccess'
TransitionParameters TransitionParameters

View file

@ -308,7 +308,7 @@ specs =
) )
AdvanceProposal AdvanceProposal
( ScriptContext ( ScriptContext
Proposal.advanceFinishedPropsoal Proposal.advanceFinishedProposal
(Spending Proposal.proposalRef) (Spending Proposal.proposalRef)
) )
, validatorFailsWith , validatorFailsWith
@ -337,7 +337,7 @@ specs =
) )
AdvanceProposal AdvanceProposal
( ScriptContext ( ScriptContext
Proposal.advancePropsoalWithInvalidOutputStake Proposal.advanceProposalWithInvalidOutputStake
(Spending Proposal.proposalRef) (Spending Proposal.proposalRef)
) )
] ]

View file

@ -287,7 +287,7 @@ proposalValidator proposal =
pisJust #$ plookup # voteFor # voteMap pisJust #$ plookup # voteFor # voteMap
-- Ensure that no lock with the current proposal id has been put on the stake. -- 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 pnot #$ pany
# plam # plam
( \((pfield @"proposalTag" #) . pfromData -> pid) -> ( \((pfield @"proposalTag" #) . pfromData -> pid) ->
@ -404,7 +404,7 @@ proposalValidator proposal =
-------------------------------------------------------------------------- --------------------------------------------------------------------------
PUnlock r -> unTermCont $ do PUnlock r -> unTermCont $ do
-- At draft stage, the votes should be empty. -- 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 pnot #$ proposalF.status #== pconstantData Draft
-- This is the vote option we're retracting from. -- This is the vote option we're retracting from.