mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-06 19:01:10 +00:00
Prevent events from being emitted during genesis construction (#5463)
* Don't populate runtime events in genesis * typo * Change to block zero * Fix vesting tests * Update frame/system/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/system/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Add test * Fix test * Fix contract tests * Fix phragmen tests * Fix Generic Assets Tests * Fix offences tests * Fix im-online * fix recovery * Fix utility tests * Shorter * Use ext Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
1 parent
b472d60a52
commit
2e76e2a74d
22 files changed
+72
-109
No files matched your search
@@ -208,7 +208,7 @@ impl ExtBuilder {
|
||||
VOTING_FEE.with(|v| *v.borrow_mut() = self.voting_fee);
|
||||
PRESENT_SLASH_PER_VOTER.with(|v| *v.borrow_mut() = self.bad_presentation_punishment);
|
||||
DECAY_RATIO.with(|v| *v.borrow_mut() = self.decay_ratio);
|
||||
GenesisConfig {
|
||||
let mut ext: sp_io::TestExternalities = GenesisConfig {
|
||||
pallet_balances: Some(pallet_balances::GenesisConfig::<Test>{
|
||||
balances: vec![
|
||||
(1, 10 * self.balance_factor),
|
||||
@@ -225,7 +225,9 @@ impl ExtBuilder {
|
||||
presentation_duration: 2,
|
||||
term_duration: 5,
|
||||
}),
|
||||
}.build_storage().unwrap().into()
|
||||
}.build_storage().unwrap().into();
|
||||
ext.execute_with(|| System::set_block_number(1));
|
||||
ext
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user