/// The best block height seen, used as a proxy for the passage of time.
highest_chain_height: AtomicUsize,
+ /// A [`Notifier`] used to wake up the background processor in case we have any [`Event`]s for
+ /// it to give to users (or [`MonitorEvent`]s for `ChannelManager` to process).
event_notifier: Notifier,
}
monitor.block_connected(
header, txdata, height, &*self.broadcaster, &*self.fee_estimator, &self.logger)
});
+ // Assume we may have some new events and wake the event processor
+ self.event_notifier.notify();
}
fn block_disconnected(&self, header: &Header, height: u32) {
monitor.transactions_confirmed(
header, txdata, height, &*self.broadcaster, &*self.fee_estimator, &self.logger)
});
+ // Assume we may have some new events and wake the event processor
+ self.event_notifier.notify();
}
fn transaction_unconfirmed(&self, txid: &Txid) {
header, height, &*self.broadcaster, &*self.fee_estimator, &self.logger
)
});
+ // Assume we may have some new events and wake the event processor
+ self.event_notifier.notify();
}
fn get_relevant_txids(&self) -> Vec<(Txid, u32, Option<BlockHash>)> {