Skip to content

Commit

Permalink
Bump up runtime and misc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Oct 31, 2024
1 parent f7c25fb commit a3c581d
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("dock-pos-dev-runtime"),
impl_name: create_runtime_str!("Dock"),
authoring_version: 1,
spec_version: 64,
spec_version: 65,
impl_version: 2,
transaction_version: 2,
apis: RUNTIME_API_VERSIONS,
Expand Down Expand Up @@ -377,29 +377,6 @@ parameter_types! {
pub const SS58Prefix: u8 = 22;
}

pub struct ChangeValidatorsConfiguration;

#[cfg(feature = "mainnet")]
impl ChangeValidatorsConfiguration {
pub const VALIDATOR_COUNT: u32 = 20;
pub const MIN_VALIDATOR_BOND: Balance = 1_000_000 * DOCK;
}

#[cfg(not(feature = "mainnet"))]
impl ChangeValidatorsConfiguration {
pub const VALIDATOR_COUNT: u32 = 2;
pub const MIN_VALIDATOR_BOND: Balance = 1_000_000 * DOCK;
}

impl OnRuntimeUpgrade for ChangeValidatorsConfiguration {
fn on_runtime_upgrade() -> Weight {
pallet_staking::ValidatorCount::<Runtime>::put(Self::VALIDATOR_COUNT);
pallet_staking::MinValidatorBond::<Runtime>::put(Self::MIN_VALIDATOR_BOND);

<Runtime as frame_system::Config>::DbWeight::get().writes(2)
}
}

#[cfg(not(any(feature = "testnet", feature = "mainnet", feature = "devnet")))]
parameter_types! {
pub const SS58Prefix: u8 = 42;
Expand Down Expand Up @@ -1882,7 +1859,6 @@ type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
ChangeValidatorsConfiguration,
>;

/// The address format for describing accounts.
Expand Down

0 comments on commit a3c581d

Please sign in to comment.