Emit new side effects before Xtx status
@@ -1281,13 +1281,16 @@ impl<T: Config> Pallet<T> {
>,
>,
) {
-
if !side_effects.is_empty() {
Self::deposit_event(Event::NewSideEffectsAvailable(
subjected_account.clone(),
xtx_id,
// ToDo: Emit circuit outbound messages -> side effects
side_effects.to_vec(),
+ side_effects
+ .iter()
+ .map(|se| se.generate_id::<SystemHashing<T>>())
+ .collect::<Vec<SideEffectId<T>>>(),
));
}
if let Some(xtx) = maybe_xtx {
@@ -1310,18 +1313,6 @@ impl<T: Config> Pallet<T> {
}
}
}
- if !side_effects.is_empty() {
- Self::deposit_event(Event::NewSideEffectsAvailable(
- subjected_account.clone(),
- xtx_id,
- // ToDo: Emit circuit outbound messages -> side effects
- side_effects.to_vec(),
- side_effects
- .iter()
- .map(|se| se.generate_id::<SystemHashing<T>>())
- .collect::<Vec<SideEffectId<T>>>(),
- ));
- }
}
fn kill(local_ctx: &mut LocalXtxCtx<T>, cause: CircuitStatus) {
