mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 12:41:07 +00:00
Check that the validation code matches the parachain code (#3433)
This introduces a check to ensure that the parachain code matches the validation code stored in the relay chain state. If not, it will print a warning. This should be mainly useful for parachain builders to make sure they have setup everything correctly.
This commit is contained in:
@@ -21,7 +21,7 @@ use cumulus_primitives_core::{
|
||||
relay_chain::{
|
||||
runtime_api::ParachainHost, Block as PBlock, BlockId, CommittedCandidateReceipt,
|
||||
Hash as PHash, Header as PHeader, InboundHrmpMessage, OccupiedCoreAssumption, SessionIndex,
|
||||
ValidatorId,
|
||||
ValidationCodeHash, ValidatorId,
|
||||
},
|
||||
InboundDownwardMessage, ParaId, PersistedValidationData,
|
||||
};
|
||||
@@ -115,6 +115,19 @@ impl RelayChainInterface for RelayChainInProcessInterface {
|
||||
)?)
|
||||
}
|
||||
|
||||
async fn validation_code_hash(
|
||||
&self,
|
||||
hash: PHash,
|
||||
para_id: ParaId,
|
||||
occupied_core_assumption: OccupiedCoreAssumption,
|
||||
) -> RelayChainResult<Option<ValidationCodeHash>> {
|
||||
Ok(self.full_client.runtime_api().validation_code_hash(
|
||||
hash,
|
||||
para_id,
|
||||
occupied_core_assumption,
|
||||
)?)
|
||||
}
|
||||
|
||||
async fn candidate_pending_availability(
|
||||
&self,
|
||||
hash: PHash,
|
||||
|
||||
Reference in New Issue
Block a user