This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree 1 file changed +10
-12
lines changed
node/network/statement-distribution/src
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -1847,6 +1847,16 @@ impl StatementDistribution {
1847
1847
FromOverseer :: Signal ( OverseerSignal :: ActiveLeaves ( ActiveLeavesUpdate { activated, deactivated } ) ) => {
1848
1848
let _timer = metrics. time_active_leaves_update ( ) ;
1849
1849
1850
+ for deactivated in deactivated {
1851
+ if active_heads. remove ( & deactivated) . is_some ( ) {
1852
+ tracing:: trace!(
1853
+ target: LOG_TARGET ,
1854
+ hash = ?deactivated,
1855
+ "Deactivating leaf" ,
1856
+ ) ;
1857
+ }
1858
+ }
1859
+
1850
1860
for activated in activated {
1851
1861
let relay_parent = activated. hash ;
1852
1862
let span = PerLeafSpan :: new ( activated. span , "statement-distribution" ) ;
@@ -1862,18 +1872,6 @@ impl StatementDistribution {
1862
1872
1863
1873
active_heads. entry ( relay_parent)
1864
1874
. or_insert ( ActiveHeadData :: new ( session_info. validators . clone ( ) , session_index, span) ) ;
1865
-
1866
- active_heads. retain ( |h, _| {
1867
- let live = !deactivated. contains ( h) ;
1868
- if !live {
1869
- tracing:: trace!(
1870
- target: LOG_TARGET ,
1871
- hash = ?h,
1872
- "Deactivating leaf" ,
1873
- ) ;
1874
- }
1875
- live
1876
- } ) ;
1877
1875
}
1878
1876
}
1879
1877
FromOverseer :: Signal ( OverseerSignal :: BlockFinalized ( ..) ) => {
You can’t perform that action at this time.
0 commit comments