@@ -284,7 +284,14 @@ impl<R: rand::Rng> StatementDistributionSubsystem<R> {
284284 ) ;
285285 } ,
286286 MuxedMessage :: Response ( result) => {
287- v2:: handle_response ( & mut ctx, & mut state, result, & mut self . reputation ) . await ;
287+ v2:: handle_response (
288+ & mut ctx,
289+ & mut state,
290+ result,
291+ & mut self . reputation ,
292+ & self . metrics ,
293+ )
294+ . await ;
288295 } ,
289296 MuxedMessage :: RetryRequest ( ( ) ) => {
290297 // A pending request is ready to retry. This is only a signal to call
@@ -320,7 +327,8 @@ impl<R: rand::Rng> StatementDistributionSubsystem<R> {
320327 let mode = prospective_parachains_mode ( ctx. sender ( ) , activated. hash ) . await ?;
321328 if let ProspectiveParachainsMode :: Enabled { .. } = mode {
322329 let res =
323- v2:: handle_active_leaves_update ( ctx, state, activated, mode) . await ;
330+ v2:: handle_active_leaves_update ( ctx, state, activated, mode, & metrics)
331+ . await ;
324332 // Regardless of the result of leaf activation, we always prune before
325333 // handling it to avoid leaks.
326334 v2:: handle_deactivate_leaves ( state, & deactivated) ;
@@ -370,6 +378,7 @@ impl<R: rand::Rng> StatementDistributionSubsystem<R> {
370378 relay_parent,
371379 statement,
372380 & mut self . reputation ,
381+ & self . metrics ,
373382 )
374383 . await ?;
375384 }
@@ -428,11 +437,24 @@ impl<R: rand::Rng> StatementDistributionSubsystem<R> {
428437
429438 if target. targets_current ( ) {
430439 // pass to v2.
431- v2:: handle_network_update ( ctx, state, event, & mut self . reputation ) . await ;
440+ v2:: handle_network_update (
441+ ctx,
442+ state,
443+ event,
444+ & mut self . reputation ,
445+ & self . metrics ,
446+ )
447+ . await ;
432448 }
433449 } ,
434450 StatementDistributionMessage :: Backed ( candidate_hash) => {
435- crate :: v2:: handle_backed_candidate_message ( ctx, state, candidate_hash) . await ;
451+ crate :: v2:: handle_backed_candidate_message (
452+ ctx,
453+ state,
454+ candidate_hash,
455+ & self . metrics ,
456+ )
457+ . await ;
436458 } ,
437459 } ,
438460 }
0 commit comments