@@ -51,7 +51,7 @@ use sc_consensus::import_queue::{ImportQueueService, IncomingBlock};
5151use sp_consensus:: { BlockOrigin , BlockStatus , SyncOracle } ;
5252use sp_runtime:: traits:: { Block as BlockT , Header as HeaderT , NumberFor } ;
5353
54- use polkadot_node_primitives:: { AvailableData , POV_BOMB_LIMIT } ;
54+ use polkadot_node_primitives:: { PoV , POV_BOMB_LIMIT } ;
5555use polkadot_node_subsystem:: messages:: AvailabilityRecoveryMessage ;
5656use polkadot_overseer:: Handle as OverseerHandle ;
5757use polkadot_primitives:: {
@@ -346,15 +346,11 @@ where
346346 }
347347
348348 /// Handle a recovered candidate.
349- async fn handle_candidate_recovered (
350- & mut self ,
351- block_hash : Block :: Hash ,
352- available_data : Option < AvailableData > ,
353- ) {
354- let available_data = match available_data {
355- Some ( data) => {
349+ async fn handle_candidate_recovered ( & mut self , block_hash : Block :: Hash , pov : Option < & PoV > ) {
350+ let pov = match pov {
351+ Some ( pov) => {
356352 self . candidates_in_retry . remove ( & block_hash) ;
357- data
353+ pov
358354 } ,
359355 None =>
360356 if self . candidates_in_retry . insert ( block_hash) {
@@ -373,18 +369,16 @@ where
373369 } ,
374370 } ;
375371
376- let raw_block_data = match sp_maybe_compressed_blob:: decompress (
377- & available_data. pov . block_data . 0 ,
378- POV_BOMB_LIMIT ,
379- ) {
380- Ok ( r) => r,
381- Err ( error) => {
382- tracing:: debug!( target: LOG_TARGET , ?error, "Failed to decompress PoV" ) ;
372+ let raw_block_data =
373+ match sp_maybe_compressed_blob:: decompress ( & pov. block_data . 0 , POV_BOMB_LIMIT ) {
374+ Ok ( r) => r,
375+ Err ( error) => {
376+ tracing:: debug!( target: LOG_TARGET , ?error, "Failed to decompress PoV" ) ;
383377
384- self . reset_candidate ( block_hash) ;
385- return
386- } ,
387- } ;
378+ self . reset_candidate ( block_hash) ;
379+ return
380+ } ,
381+ } ;
388382
389383 let block_data = match ParachainBlockData :: < Block > :: decode ( & mut & raw_block_data[ ..] ) {
390384 Ok ( d) => d,
@@ -595,10 +589,10 @@ where
595589 next_to_recover = self . candidate_recovery_queue. next_recovery( ) . fuse( ) => {
596590 self . recover_candidate( next_to_recover) . await ;
597591 } ,
598- ( block_hash, available_data ) =
592+ ( block_hash, pov ) =
599593 self . active_candidate_recovery. wait_for_recovery( ) . fuse( ) =>
600594 {
601- self . handle_candidate_recovered( block_hash, available_data ) . await ;
595+ self . handle_candidate_recovered( block_hash, pov . as_deref ( ) ) . await ;
602596 } ,
603597 }
604598 }
0 commit comments