mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +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:
@@ -489,6 +489,7 @@ impl ExtBuilder {
|
||||
// This must be ensured by having `timestamp::on_initialize` called before
|
||||
// `staking::on_initialize`
|
||||
ext.execute_with(|| {
|
||||
System::set_block_number(1);
|
||||
Timestamp::set_timestamp(INIT_TIMESTAMP);
|
||||
});
|
||||
|
||||
|
||||
@@ -1706,7 +1706,6 @@ fn new_era_elects_correct_number_of_validators() {
|
||||
assert_eq!(Staking::validator_count(), 1);
|
||||
assert_eq!(validator_controllers().len(), 1);
|
||||
|
||||
System::set_block_number(1);
|
||||
Session::on_initialize(System::block_number());
|
||||
|
||||
assert_eq!(validator_controllers().len(), 1);
|
||||
|
||||
Reference in New Issue
Block a user