Unverified Commit e86cad93 authored by André Silva's avatar André Silva Committed by GitHub
Browse files

runtime: remove random_seed from BlockBuilder API (#2968)



* runtime: remove random_seed from BlockBuilder API

* update Substrate

* runtime: remove unused imports

* revert Cargo.lock version 3 removal, update sp-io

Co-authored-by: parity-processbot <>
Co-authored-by: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>
parent f9d5ad2a
Pipeline #136762 passed with stages
in 39 minutes and 41 seconds
This diff is collapsed.
......@@ -80,7 +80,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, Randomness, LockIdentifier, Filter, InstanceFilter, All},
traits::{KeyOwnerProofSystem, LockIdentifier, Filter, InstanceFilter, All},
weights::Weight,
};
use frame_system::{EnsureRoot, EnsureOneOf};
......@@ -1364,10 +1364,6 @@ sp_api::impl_runtime_apis! {
) -> inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
fn random_seed() -> <Block as BlockT>::Hash {
pallet_babe::RandomnessFromOneEpochAgo::<Runtime>::random_seed().0
}
}
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
......
......@@ -58,7 +58,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, Randomness, LockIdentifier, Filter},
traits::{KeyOwnerProofSystem, LockIdentifier, Filter},
weights::Weight,
};
use frame_system::{EnsureRoot, EnsureOneOf};
......@@ -1103,10 +1103,6 @@ sp_api::impl_runtime_apis! {
) -> inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
fn random_seed() -> <Block as BlockT>::Hash {
pallet_babe::RandomnessFromOneEpochAgo::<Runtime>::random_seed().0
}
}
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
......
......@@ -985,10 +985,6 @@ sp_api::impl_runtime_apis! {
) -> inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
fn random_seed() -> <Block as BlockT>::Hash {
pallet_babe::RandomnessFromOneEpochAgo::<Runtime>::random_seed().0
}
}
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
......
......@@ -64,7 +64,7 @@ use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
use sp_version::NativeVersion;
use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{parameter_types, construct_runtime, traits::{KeyOwnerProofSystem, Randomness}};
use frame_support::{parameter_types, construct_runtime, traits::KeyOwnerProofSystem};
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pallet_session::historical as session_historical;
......@@ -606,10 +606,6 @@ sp_api::impl_runtime_apis! {
) -> inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
fn random_seed() -> <Block as BlockT>::Hash {
RandomnessCollectiveFlip::random_seed().0
}
}
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
......
......@@ -82,7 +82,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug,
traits::{KeyOwnerProofSystem, Randomness, Filter, InstanceFilter, All},
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All},
weights::Weight,
};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
......@@ -1061,10 +1061,6 @@ sp_api::impl_runtime_apis! {
) -> inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
fn random_seed() -> <Block as BlockT>::Hash {
pallet_babe::RandomnessFromOneEpochAgo::<Runtime>::random_seed().0
}
}
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment