From 52850086f9a5f04f4f2b72967b7b9feb270e9a92 Mon Sep 17 00:00:00 2001 From: Raid Ateir Date: Wed, 23 Aug 2023 15:26:39 +0200 Subject: [PATCH] remove type TimeProvider --- Cargo.lock | 1 + pallets/ddc-accounts/src/lib.rs | 1 - pallets/ddc-staking/src/lib.rs | 2 -- pallets/ddc-staking/src/mock.rs | 1 - pallets/ddc-validator/src/lib.rs | 1 - pallets/ddc-validator/src/mock.rs | 3 --- runtime/cere-dev/src/lib.rs | 3 --- 7 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dbbcfb847..3a7808820 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4833,6 +4833,7 @@ dependencies = [ "frame-support", "frame-system", "log", + "pallet-ddc-staking", "parity-scale-codec", "scale-info", "sp-io", diff --git a/pallets/ddc-accounts/src/lib.rs b/pallets/ddc-accounts/src/lib.rs index 773f53126..2cb567438 100644 --- a/pallets/ddc-accounts/src/lib.rs +++ b/pallets/ddc-accounts/src/lib.rs @@ -163,7 +163,6 @@ pub mod pallet { /// Number of eras that staked funds must remain bonded for. #[pallet::constant] type BondingDuration: Get; - type TimeProvider: UnixTime; } /// Map from all locked "stash" accounts to the controller account. diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index 64aa27968..224077247 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -251,8 +251,6 @@ pub mod pallet { /// Time used for computing era index. It is guaranteed to start being called from the first /// `on_finalize`. type UnixTime: UnixTime; - - type TimeProvider: UnixTime; } /// Map from all locked "stash" accounts to the controller account. diff --git a/pallets/ddc-staking/src/mock.rs b/pallets/ddc-staking/src/mock.rs index 88b696b81..c82675b73 100644 --- a/pallets/ddc-staking/src/mock.rs +++ b/pallets/ddc-staking/src/mock.rs @@ -107,7 +107,6 @@ impl crate::pallet::Config for Test { type DefaultStorageChillDelay = DefaultStorageChillDelay; type RuntimeEvent = RuntimeEvent; type UnixTime = Timestamp; - type TimeProvider = Timestamp; type WeightInfo = (); type StakersPayoutSource = DdcAccountsPalletId; } diff --git a/pallets/ddc-validator/src/lib.rs b/pallets/ddc-validator/src/lib.rs index a63706e2a..c29ea49cf 100644 --- a/pallets/ddc-validator/src/lib.rs +++ b/pallets/ddc-validator/src/lib.rs @@ -200,7 +200,6 @@ pub mod pallet { type RuntimeCall: From>; type AuthorityId: AppCrypto; - type TimeProvider: UnixTime; /// Number of validators expected to produce an individual validation decision to form a /// consensus. Tasks assignment procedure use this value to determine the number of diff --git a/pallets/ddc-validator/src/mock.rs b/pallets/ddc-validator/src/mock.rs index 77e1f0718..c79fc5b0e 100644 --- a/pallets/ddc-validator/src/mock.rs +++ b/pallets/ddc-validator/src/mock.rs @@ -253,7 +253,6 @@ impl pallet_ddc_accounts::Config for Test { type Currency = Balances; type RuntimeEvent = RuntimeEvent; type PalletId = DdcAccountsPalletId; - type TimeProvider = pallet_timestamp::Pallet; } parameter_types! { @@ -273,7 +272,6 @@ impl pallet_ddc_staking::Config for Test { type RuntimeEvent = RuntimeEvent; type StakersPayoutSource = DdcAccountsPalletId; type UnixTime = Timestamp; - type TimeProvider = Timestamp; type WeightInfo = pallet_ddc_staking::weights::SubstrateWeight; } @@ -288,7 +286,6 @@ impl pallet_ddc_validator::Config for Test { type Randomness = RandomnessCollectiveFlip; type RuntimeCall = RuntimeCall; type AuthorityId = pallet_ddc_validator::crypto::TestAuthId; - type TimeProvider = pallet_timestamp::Pallet; type ValidationThreshold = ValidationThreshold; type ValidatorsMax = (); } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 11be6ce59..803f9d3bf 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -1332,7 +1332,6 @@ impl pallet_ddc_staking::Config for Runtime { type DefaultStorageBondSize = DefaultStorageBondSize; type DefaultStorageChillDelay = DefaultStorageChillDelay; type RuntimeEvent = RuntimeEvent; - type TimeProvider = pallet_timestamp::Pallet; type StakersPayoutSource = Ddc_Accounts_Pallet_Id; type UnixTime = Timestamp; type WeightInfo = pallet_ddc_staking::weights::SubstrateWeight; @@ -1347,7 +1346,6 @@ impl pallet_ddc_accounts::Config for Runtime { type Currency = Balances; type PalletId = Ddc_Accounts_Pallet_Id; type RuntimeEvent = RuntimeEvent; - type TimeProvider = pallet_timestamp::Pallet; } parameter_types! { @@ -1362,7 +1360,6 @@ impl pallet_ddc_validator::Config for Runtime { type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; type AuthorityId = pallet_ddc_validator::crypto::TestAuthId; - type TimeProvider = pallet_timestamp::Pallet; type ValidationThreshold = ValidationThreshold; type ValidatorsMax = ValidatorsMax; }