I am trying to fast track a referendum but the runtime has InstantAllowed
set to false
. When i try to execute the extrinsic I get a democracy.InstantNotAllowed
error.
Also, the votingPeriod
and Delay
parameters are slightly ambiguous. Does it require the block number or number of blocks?
parameter_types! {
pub LaunchPeriod: BlockNumber = prod_or_fast!(2 * DAYS, 1, "KAB_LAUNCH_PERIOD");
pub VotingPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES, "KAB_VOTING_PERIOD");
pub FastTrackVotingPeriod: BlockNumber = prod_or_fast!(3 * DAYS , 1 * MINUTES, "KAB_FAST_TRACK_VOTING_PERIOD");
pub const MinimumDeposit: Balance = 1 * CENTS;
pub EnactmentPeriod: BlockNumber = prod_or_fast!(1 * DAYS, 1, "KAB_ENACTMENT_PERIOD");
pub CooloffPeriod: BlockNumber = prod_or_fast!(7 * DAYS, 1 * MINUTES, "KAB_COOLOFF_PERIOD");
pub const InstantAllowed: bool = false;
pub const MaxVotes: u32 = 100;
pub const MaxProposals: u32 = 100;
pub const PreimageByteDeposit: Balance = 1 * BILLICENTS;
}
impl pallet_democracy::Config for Runtime {
type Proposal = Call;
type Event = Event;
type Currency = Balances;
type EnactmentPeriod = EnactmentPeriod;
type VoteLockingPeriod = EnactmentPeriod;
type LaunchPeriod = LaunchPeriod;
type VotingPeriod = VotingPeriod;
type MinimumDeposit = MinimumDeposit;
type ExternalOrigin = EnsureSigned<AccountId>;
type ExternalMajorityOrigin = EnsureSigned<AccountId>;
type ExternalDefaultOrigin = EnsureSigned<AccountId>;
type FastTrackOrigin = EnsureSigned<AccountId>;
type InstantOrigin = EnsureSigned<AccountId>;
type InstantAllowed = InstantAllowed;
type FastTrackVotingPeriod = FastTrackVotingPeriod;
type CancellationOrigin = EnsureRoot<AccountId>;
type BlacklistOrigin = EnsureRoot<AccountId>;
type CancelProposalOrigin = EnsureRoot<AccountId>;
type VetoOrigin = EnsureSigned<AccountId>;
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type OperationalPreimageOrigin = EnsureSigned<AccountId>;
type Slash = Treasury;
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
type WeightInfo = pallet_democracy::weights::SubstrateWeight<Runtime>;
type MaxProposals = MaxProposals;
}