Skip to content

Commit

Permalink
remove type TimeProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Raid5594 committed Aug 23, 2023
1 parent b87f620 commit 5285008
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pallets/ddc-accounts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ pub mod pallet {
/// Number of eras that staked funds must remain bonded for.
#[pallet::constant]
type BondingDuration: Get<EraIndex>;
type TimeProvider: UnixTime;
}

/// Map from all locked "stash" accounts to the controller account.
Expand Down
2 changes: 0 additions & 2 deletions pallets/ddc-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion pallets/ddc-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion pallets/ddc-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ pub mod pallet {
type RuntimeCall: From<Call<Self>>;

type AuthorityId: AppCrypto<Self::Public, Self::Signature>;
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
Expand Down
3 changes: 0 additions & 3 deletions pallets/ddc-validator/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Test>;
}

parameter_types! {
Expand All @@ -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<Test>;
}

Expand All @@ -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<Test>;
type ValidationThreshold = ValidationThreshold;
type ValidatorsMax = ();
}
Expand Down
3 changes: 0 additions & 3 deletions runtime/cere-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runtime>;
type StakersPayoutSource = Ddc_Accounts_Pallet_Id;
type UnixTime = Timestamp;
type WeightInfo = pallet_ddc_staking::weights::SubstrateWeight<Runtime>;
Expand All @@ -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<Runtime>;
}

parameter_types! {
Expand All @@ -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<Runtime>;
type ValidationThreshold = ValidationThreshold;
type ValidatorsMax = ValidatorsMax;
}
Expand Down

0 comments on commit 5285008

Please sign in to comment.