mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
runtime: use babe as randomness source (#2504)
* runtime: use babe as randomness source * runtime: fix randomness api * bridges: fix random_seed * parachains: use mock TestRandomness from frame_support_test * parachains: use mock TestRandomness from frame_support_test * runtime: update randomness source in test-runtime * runtime: remove unused import * parachains: add todo to audit usage of randomness api * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -818,7 +818,7 @@ parameter_types! {
|
||||
impl pallet_society::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type Randomness = RandomnessCollectiveFlip;
|
||||
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
|
||||
type CandidateDeposit = CandidateDeposit;
|
||||
type WrongSideDeduction = WrongSideDeduction;
|
||||
type MaxStrikes = MaxStrikes;
|
||||
@@ -1140,7 +1140,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
|
||||
fn random_seed() -> <Block as BlockT>::Hash {
|
||||
RandomnessCollectiveFlip::random_seed()
|
||||
pallet_babe::RandomnessFromOneEpochAgo::<Runtime>::random_seed().0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user