mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +00:00
Migrate remaining old decl_* macros to the new pallet attribute macros (#12271)
* Migrate remaining old decl_* macros to the new pallet attribute macros Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Apply review suggestions Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Apply review suggestions Signed-off-by: koushiro <koushiro.cqx@gmail.com> * use pallet::storage * Fix dev rpc test Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix service tests Signed-off-by: koushiro <koushiro.cqx@gmail.com> Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -17,8 +17,9 @@
|
||||
|
||||
//! Tool for creating the genesis block.
|
||||
|
||||
use super::{system, wasm_binary_unwrap, AccountId, AuthorityId};
|
||||
use super::{system, wasm_binary_unwrap, AccountId, AuthorityId, Runtime};
|
||||
use codec::{Encode, Joiner, KeyedVec};
|
||||
use frame_support::traits::GenesisBuild;
|
||||
use sc_service::client::genesis;
|
||||
use sp_core::{
|
||||
map,
|
||||
@@ -80,10 +81,11 @@ impl GenesisConfig {
|
||||
// Assimilate the system genesis config.
|
||||
let mut storage =
|
||||
Storage { top: map, children_default: self.extra_storage.children_default.clone() };
|
||||
let config = system::GenesisConfig { authorities: self.authorities.clone() };
|
||||
config
|
||||
.assimilate_storage(&mut storage)
|
||||
.expect("Adding `system::GensisConfig` to the genesis");
|
||||
<system::GenesisConfig as GenesisBuild<Runtime>>::assimilate_storage(
|
||||
&system::GenesisConfig { authorities: self.authorities.clone() },
|
||||
&mut storage,
|
||||
)
|
||||
.expect("Adding `system::GensisConfig` to the genesis");
|
||||
|
||||
storage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user