Skip to content

Commit

Permalink
Merge pull request #70 from reef-defi/f/queue-fix
Browse files Browse the repository at this point in the history
Drain the pending event queue
  • Loading branch information
Netherdrake authored Jul 28, 2022
2 parents 4224f80 + b40fdcb commit 23cc618
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,13 @@ pub mod module {
}

impl<T: Config> Pallet<T> {
/// Process queued events
/// Process queued events.
/// The event queue must be purged at the end of each extrinsic call.
pub fn process_queued_events() -> DispatchResult {
for event in Self::queued_events().drain(..) {
for event in Self::queued_events() {
Pallet::<T>::deposit_event(event);
}
QueuedEvents::<T>::set(Vec::new());
Ok(())
}

Expand Down

0 comments on commit 23cc618

Please sign in to comment.