mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Alliance pallet: retirement notice call (#11970)
* Alliance pallet: retirement notice * add alliance pallet to benchmark list for dev chain * fix type * ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance * ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance * link weight generated by bench for retirement_notice method * migration to clear UpForKicking storage prefix * rename migration from v1 to v0_to_v1 * Apply suggestions from code review Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * rename `retirement-notice to give-retirement-notice * Apply suggestions from code review Co-authored-by: Squirrel <gilescope@gmail.com> * review fixes: update doc, saturating add, BlockNumber type alias * add suffix to duratin consts *_IN_BLOCKS * ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance * add negative tests (#11995) * add negative tests * remove tests powerless asserts checking against announcment origin * assert bad origin from announcement origin checks Co-authored-by: muharem <ismailov.m.h@gmail.com> Co-authored-by: command-bot <> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
@@ -1518,8 +1518,10 @@ impl pallet_state_trie_migration::Config for Runtime {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
const ALLIANCE_MOTION_DURATION_IN_BLOCKS: BlockNumber = 5 * DAYS;
|
||||
|
||||
parameter_types! {
|
||||
pub const AllianceMotionDuration: BlockNumber = 5 * DAYS;
|
||||
pub const AllianceMotionDuration: BlockNumber = ALLIANCE_MOTION_DURATION_IN_BLOCKS;
|
||||
pub const AllianceMaxProposals: u32 = 100;
|
||||
pub const AllianceMaxMembers: u32 = 100;
|
||||
}
|
||||
@@ -1541,6 +1543,7 @@ parameter_types! {
|
||||
pub const MaxFellows: u32 = AllianceMaxMembers::get() - MaxFounders::get();
|
||||
pub const MaxAllies: u32 = 100;
|
||||
pub const AllyDeposit: Balance = 10 * DOLLARS;
|
||||
pub const RetirementPeriod: BlockNumber = ALLIANCE_MOTION_DURATION_IN_BLOCKS + (1 * DAYS);
|
||||
}
|
||||
|
||||
impl pallet_alliance::Config for Runtime {
|
||||
@@ -1577,6 +1580,7 @@ impl pallet_alliance::Config for Runtime {
|
||||
type MaxMembersCount = AllianceMaxMembers;
|
||||
type AllyDeposit = AllyDeposit;
|
||||
type WeightInfo = pallet_alliance::weights::SubstrateWeight<Runtime>;
|
||||
type RetirementPeriod = RetirementPeriod;
|
||||
}
|
||||
|
||||
construct_runtime!(
|
||||
@@ -1682,9 +1686,16 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
|
||||
Migrations,
|
||||
>;
|
||||
|
||||
// All migrations executed on runtime upgrade as a nested tuple of types implementing
|
||||
// `OnRuntimeUpgrade`.
|
||||
type Migrations = (
|
||||
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
|
||||
pallet_alliance::migration::Migration<Runtime>,
|
||||
);
|
||||
|
||||
/// MMR helper types.
|
||||
mod mmr {
|
||||
use super::Runtime;
|
||||
@@ -1703,6 +1714,7 @@ extern crate frame_benchmarking;
|
||||
mod benches {
|
||||
define_benchmarks!(
|
||||
[frame_benchmarking, BaselineBench::<Runtime>]
|
||||
[pallet_alliance, Alliance]
|
||||
[pallet_assets, Assets]
|
||||
[pallet_babe, Babe]
|
||||
[pallet_bags_list, BagsList]
|
||||
|
||||
Reference in New Issue
Block a user