Skip to content

Commit

Permalink
remove deprecated shuffling seed storage & runtime api
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszaaa committed Sep 15, 2021
1 parent 87e5914 commit da019ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
12 changes: 3 additions & 9 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use hex_literal::hex;
use mangata_runtime::{
AccountId, AssetsInfoConfig, BabeConfig, BridgeConfig, BridgedAssetConfig, CouncilConfig,
ElectionsConfig, GenesisConfig, GrandpaConfig, RandomConfig, SessionConfig, SessionKeys,
Signature, StakerStatus, StakingConfig, SudoConfig, SystemConfig, TokensConfig, VerifierConfig,
XykConfig, WASM_BINARY,
ElectionsConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature,
StakerStatus, StakingConfig, SudoConfig, SystemConfig, TokensConfig, VerifierConfig, XykConfig,
WASM_BINARY,
};
use sc_service::ChainType;
use sp_consensus_babe::AuthorityId as BabeId;
Expand Down Expand Up @@ -159,7 +159,6 @@ pub fn development_config() -> Result<ChainSpec, String> {
10_000__000_000_000_000_000_000u128,
)],
true,
[0_u8; 32],
)
},
// Bootnodes
Expand Down Expand Up @@ -277,7 +276,6 @@ pub fn local_testnet_config() -> Result<ChainSpec, String> {
10_000__000_000_000_000_000_000u128,
)],
true,
[0_u8; 32],
)
},
// Bootnodes
Expand Down Expand Up @@ -306,7 +304,6 @@ fn testnet_genesis(
tokens_endowment: Vec<(u32, u128, AccountId)>,
staking_accounts: Vec<(AccountId, u32, u128, u32, u128, u32, u128)>,
_enable_println: bool,
init_seed: [u8; 32],
) -> GenesisConfig {
GenesisConfig {
frame_system: Some(SystemConfig {
Expand Down Expand Up @@ -443,9 +440,6 @@ fn testnet_genesis(
})
.collect(),
}),
pallet_random_seed: Some(RandomConfig {
random_seed: init_seed,
}),
pallet_treasury: Some(Default::default()),
pallet_collective_Instance1: Some(CouncilConfig::default()),
pallet_elections_phragmen: Some(ElectionsConfig {
Expand Down
1 change: 0 additions & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ static_assertions = "1.1.0"
pallet-encrypted-tx = { path = '../pallets/encrypted-tx', default-features = false, version = '0.1.0' }
pallet-xyk = { path = '../pallets/xyk', default-features = false, version = '0.1.0' }
xyk-runtime-api = { path = '../pallets/xyk/runtime-api', default-features = false, version = '2.0.0' }
random-seed-runtime-api = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" }
extrinsic-info-runtime-api = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" }
frame-executive = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" }
pallet-timestamp = { default-features = false, version = '2.0.0' , git = "https://github.com/mangata-finance/substrate", branch = "mangata-dev" }
Expand Down
9 changes: 0 additions & 9 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,6 @@ impl pallet_sudo_origin::Trait for Runtime {
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}

impl pallet_random_seed::Trait for Runtime {}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime where
Expand All @@ -652,7 +650,6 @@ construct_runtime!(
System: frame_system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Random: pallet_random_seed::{Module, Call, Storage, Inherent, Config},
Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
Authorship: pallet_authorship::{Module, Call, Storage, Inherent},
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
Expand Down Expand Up @@ -949,12 +946,6 @@ impl_runtime_apis! {
}
}

impl random_seed_runtime_api::RandomSeedApi<Block> for Runtime {
fn get_seed() -> pallet_random_seed::SeedType{
Random::seed()
}
}

#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn dispatch_benchmark(
Expand Down

0 comments on commit da019ed

Please sign in to comment.