Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Collectives runtime: alliance pallet upgrade introducing new retirement notice feature #1573

Merged
merged 4 commits into from
Aug 29, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ parameter_types! {
// account used to temporarily deposit slashed imbalance before teleporting
pub SlashedImbalanceAccId: AccountId = constants::account::SLASHED_IMBALANCE_ACC_ID.into();
pub RelayTreasuryAccId: AccountId = constants::account::RELAY_TREASURY_PALL_ID.into_account_truncating();
// The number of blocks a member must wait between giving a retirement notice and retiring.
// Supposed to be greater than time required to `kick_member` with alliance motion.
pub const AllianceRetirementPeriod: BlockNumber = (90 * DAYS) + AllianceMotionDuration;
}

impl pallet_alliance::Config for Runtime {
Expand All @@ -463,6 +466,7 @@ impl pallet_alliance::Config for Runtime {
type Slashed = ToParentTreasury<RelayTreasuryAccId, SlashedImbalanceAccId, Runtime>;
type InitializeMembers = AllianceMotion;
type MembershipChanged = AllianceMotion;
type RetirementPeriod = AllianceRetirementPeriod;
type IdentityVerifier = (); // Don't block accounts on identity criteria
type ProposalProvider = AllianceProposalProvider<Runtime, AllianceCollective>;
type MaxProposals = ConstU32<ALLIANCE_MAX_MEMBERS>;
Expand Down Expand Up @@ -549,8 +553,13 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
Migrations,
>;

// All migrations executed on runtime upgrade as a nested tuple of types implementing `OnRuntimeUpgrade`.
// Included migrations must be idempotent.
type Migrations = (pallet_alliance::migration::Migration<Runtime>,);

#[cfg(feature = "runtime-benchmarks")]
#[macro_use]
extern crate frame_benchmarking;
Expand Down