mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Adds new event phase Initialization (#5302)
* Adds new event phase `Initialization` Every event that was deposited inside of `on_initialize` was assigned to the `ApplyExtrinsic(0)` phase which wasn't correct. This pr introduces a new phase `Initialization`. This is the new phase while initializing a block. After initialization we switch to `ApplyExtrinsic(N)` and at the end to `Finalization` as before. * Set `ExecutionPhase` in `initialize` * Increment `spec_version`
This commit is contained in:
@@ -129,7 +129,7 @@ fn should_deposit_event() {
|
||||
assert_eq!(
|
||||
System::events(),
|
||||
vec![EventRecord {
|
||||
phase: Phase::ApplyExtrinsic(0),
|
||||
phase: Phase::Initialization,
|
||||
event: TestEvent::offences(crate::Event::Offence(KIND, time_slot.encode())),
|
||||
topics: vec![],
|
||||
}]
|
||||
@@ -164,7 +164,7 @@ fn doesnt_deposit_event_for_dups() {
|
||||
assert_eq!(
|
||||
System::events(),
|
||||
vec![EventRecord {
|
||||
phase: Phase::ApplyExtrinsic(0),
|
||||
phase: Phase::Initialization,
|
||||
event: TestEvent::offences(crate::Event::Offence(KIND, time_slot.encode())),
|
||||
topics: vec![],
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user