create newtype for ValidationCodeHash (#3212)

* create newtype for ValidationCodeHash

* pvf: fix tests compilation

* primitives: fix test compilation
This commit is contained in:
André Silva
2021-06-12 17:44:07 +01:00
committed by GitHub
parent 693302bee0
commit 097cadca19
15 changed files with 102 additions and 58 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ use sp_std::collections::btree_map::BTreeMap;
use parity_scale_codec::{Encode, Decode};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
GroupRotationInfo, CoreState, Id, ValidationCode, CandidateEvent,
GroupRotationInfo, CoreState, Id, ValidationCode, ValidationCodeHash, CandidateEvent,
ValidatorId, ValidatorIndex, CommittedCandidateReceipt, OccupiedCoreAssumption,
PersistedValidationData, InboundDownwardMessage, InboundHrmpMessage,
SessionInfo as SessionInfoData,
@@ -1136,7 +1136,7 @@ sp_api::impl_runtime_apis! {
runtime_api_impl::inbound_hrmp_channels_contents::<Runtime>(recipient)
}
fn validation_code_by_hash(hash: Hash) -> Option<ValidationCode> {
fn validation_code_by_hash(hash: ValidationCodeHash) -> Option<ValidationCode> {
runtime_api_impl::validation_code_by_hash::<Runtime>(hash)
}
}