@@ -26,10 +26,11 @@ use futures::{executor::block_on, poll, task::Poll, FutureExt, Stream, StreamExt
2626use parking_lot:: Mutex ;
2727use polkadot_node_primitives:: { SignedFullStatement , Statement } ;
2828use polkadot_primitives:: {
29+ vstaging:: { CommittedCandidateReceiptV2 , CoreState } ,
2930 BlockNumber , CandidateCommitments , CandidateDescriptor , CollatorPair ,
30- CommittedCandidateReceipt , CoreState , Hash as PHash , HeadData , InboundDownwardMessage ,
31- InboundHrmpMessage , OccupiedCoreAssumption , PersistedValidationData , SessionIndex ,
32- SigningContext , ValidationCodeHash , ValidatorId ,
31+ CommittedCandidateReceipt , Hash as PHash , HeadData , InboundDownwardMessage , InboundHrmpMessage ,
32+ OccupiedCoreAssumption , PersistedValidationData , SessionIndex , SigningContext ,
33+ ValidationCodeHash , ValidatorId ,
3334} ;
3435use polkadot_test_client:: {
3536 Client as PClient , ClientBlockImportExt , DefaultTestClientBuilderExt , FullBackend as PBackend ,
@@ -166,15 +167,15 @@ impl RelayChainInterface for DummyRelayChainInterface {
166167 & self ,
167168 _: PHash ,
168169 _: ParaId ,
169- ) -> RelayChainResult < Option < CommittedCandidateReceipt > > {
170+ ) -> RelayChainResult < Option < CommittedCandidateReceiptV2 > > {
170171 if self . data . lock ( ) . runtime_version >=
171172 RuntimeApiRequest :: CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT
172173 {
173174 panic ! ( "Should have used candidates_pending_availability instead" ) ;
174175 }
175176
176177 if self . data . lock ( ) . has_pending_availability {
177- Ok ( Some ( dummy_candidate ( ) ) )
178+ Ok ( Some ( dummy_candidate ( ) . into ( ) ) )
178179 } else {
179180 Ok ( None )
180181 }
@@ -184,15 +185,15 @@ impl RelayChainInterface for DummyRelayChainInterface {
184185 & self ,
185186 _: PHash ,
186187 _: ParaId ,
187- ) -> RelayChainResult < Vec < CommittedCandidateReceipt > > {
188+ ) -> RelayChainResult < Vec < CommittedCandidateReceiptV2 > > {
188189 if self . data . lock ( ) . runtime_version <
189190 RuntimeApiRequest :: CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT
190191 {
191192 panic ! ( "Should have used candidate_pending_availability instead" ) ;
192193 }
193194
194195 if self . data . lock ( ) . has_pending_availability {
195- Ok ( vec ! [ dummy_candidate( ) ] )
196+ Ok ( vec ! [ dummy_candidate( ) . into ( ) ] )
196197 } else {
197198 Ok ( vec ! [ ] )
198199 }
@@ -412,7 +413,7 @@ async fn make_gossip_message_and_header(
412413 validation_code_hash : ValidationCodeHash :: from ( PHash :: random ( ) ) ,
413414 } ,
414415 } ;
415- let statement = Statement :: Seconded ( candidate_receipt) ;
416+ let statement = Statement :: Seconded ( candidate_receipt. into ( ) ) ;
416417 let signed = SignedFullStatement :: sign (
417418 & keystore,
418419 statement,
@@ -525,7 +526,7 @@ fn legacy_block_announce_data_handling() {
525526
526527 let block_data =
527528 BlockAnnounceData :: decode ( & mut & data[ ..] ) . expect ( "Decoding works from legacy works" ) ;
528- assert_eq ! ( receipt. descriptor. relay_parent, block_data. relay_parent) ;
529+ assert_eq ! ( receipt. descriptor. relay_parent( ) , block_data. relay_parent) ;
529530
530531 let data = block_data. encode ( ) ;
531532 LegacyBlockAnnounceData :: decode ( & mut & data[ ..] ) . expect ( "Decoding works" ) ;
@@ -600,7 +601,8 @@ async fn check_statement_seconded() {
600601 erasure_root : PHash :: random ( ) ,
601602 signature : sp_core:: sr25519:: Signature :: default ( ) . into ( ) ,
602603 validation_code_hash : ValidationCodeHash :: from ( PHash :: random ( ) ) ,
603- } ,
604+ }
605+ . into ( ) ,
604606 } ,
605607 statement : signed_statement. convert_payload ( ) . into ( ) ,
606608 relay_parent,
0 commit comments