mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 01:38:04 +00:00
Support multi trie in genesis generation (#958)
* Support multi trie in genesis generation * Fix merge issues
This commit is contained in:
@@ -79,7 +79,7 @@ pub fn new_test_ext(
|
||||
monied: bool,
|
||||
reward: u64
|
||||
) -> runtime_io::TestExternalities<Blake2Hasher> {
|
||||
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap().0;
|
||||
let balance_factor = if ext_deposit > 0 {
|
||||
256
|
||||
} else {
|
||||
@@ -88,11 +88,11 @@ pub fn new_test_ext(
|
||||
t.extend(consensus::GenesisConfig::<Test>{
|
||||
code: vec![],
|
||||
authorities: vec![],
|
||||
}.build_storage().unwrap());
|
||||
}.build_storage().unwrap().0);
|
||||
t.extend(session::GenesisConfig::<Test>{
|
||||
session_length,
|
||||
validators: vec![10, 20],
|
||||
}.build_storage().unwrap());
|
||||
}.build_storage().unwrap().0);
|
||||
t.extend(balances::GenesisConfig::<Test>{
|
||||
balances: if monied {
|
||||
if reward > 0 {
|
||||
@@ -109,7 +109,7 @@ pub fn new_test_ext(
|
||||
transfer_fee: 0,
|
||||
creation_fee: 0,
|
||||
reclaim_rebate: 0,
|
||||
}.build_storage().unwrap());
|
||||
}.build_storage().unwrap().0);
|
||||
t.extend(GenesisConfig::<Test>{
|
||||
sessions_per_era,
|
||||
current_era,
|
||||
@@ -122,10 +122,10 @@ pub fn new_test_ext(
|
||||
current_session_reward: reward,
|
||||
current_offline_slash: 20,
|
||||
offline_slash_grace: 0,
|
||||
}.build_storage().unwrap());
|
||||
}.build_storage().unwrap().0);
|
||||
t.extend(timestamp::GenesisConfig::<Test>{
|
||||
period: 5
|
||||
}.build_storage().unwrap());
|
||||
}.build_storage().unwrap().0);
|
||||
runtime_io::TestExternalities::new(t)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user