+ /// Gets the list of pending events which were generated by previous actions, clearing the list
+ /// in the process.
+ ///
+ /// This is called by ManyChannelMonitor::get_and_clear_pending_events() and is equivalent to
+ /// EventsProvider::get_and_clear_pending_events() except that it requires &mut self as we do
+ /// no internal locking in ChannelMonitors.
+ pub fn get_and_clear_pending_events(&mut self) -> Vec<events::Event> {
+ let mut ret = Vec::new();
+ mem::swap(&mut ret, &mut self.pending_events);
+ ret
+ }
+