mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-16 03:45:43 +00:00
Don't send ActiveLeaves from leaves in db on startup in Overseer (#6727)
* Don't send `ActiveLeaves` from leaves in db on startup in Overseer. Wait for fresh leaves instead. * Don't pass initial set of leaves to Overseer * Fix compilation error in subsystem-test-helpers
This commit is contained in:
committed by
GitHub
parent
dfb60f32cd
commit
ed6fa5499c
@@ -612,11 +612,6 @@ pub struct Overseer<SupportsParachains> {
|
||||
/// Stores the [`jaeger::Span`] per active leaf.
|
||||
pub span_per_active_leaf: HashMap<Hash, Arc<jaeger::Span>>,
|
||||
|
||||
/// A set of leaves that `Overseer` starts working with.
|
||||
///
|
||||
/// Drained at the beginning of `run` and never used again.
|
||||
pub leaves: Vec<(Hash, BlockNumber)>,
|
||||
|
||||
/// The set of the "active leaves".
|
||||
pub active_leaves: HashMap<Hash, BlockNumber>,
|
||||
|
||||
@@ -728,16 +723,6 @@ where
|
||||
let metrics = self.metrics.clone();
|
||||
spawn_metronome_metrics(&mut self, metrics)?;
|
||||
|
||||
// Notify about active leaves on startup before starting the loop
|
||||
for (hash, number) in std::mem::take(&mut self.leaves) {
|
||||
let _ = self.active_leaves.insert(hash, number);
|
||||
if let Some((span, status)) = self.on_head_activated(&hash, None).await {
|
||||
let update =
|
||||
ActiveLeavesUpdate::start_work(ActivatedLeaf { hash, number, status, span });
|
||||
self.broadcast_signal(OverseerSignal::ActiveLeaves(update)).await?;
|
||||
}
|
||||
}
|
||||
|
||||
loop {
|
||||
select! {
|
||||
msg = self.events_rx.select_next_some() => {
|
||||
|
||||
Reference in New Issue
Block a user