diff --git a/runtime/common/src/parachains.rs b/runtime/common/src/parachains.rs index 55fa3b920a1e..8bdb07b75d0f 100644 --- a/runtime/common/src/parachains.rs +++ b/runtime/common/src/parachains.rs @@ -140,7 +140,7 @@ impl DoubleVoteReport { ) -> Result<(), DoubleVoteValidityError> { let first = self.first.clone(); let second = self.second.clone(); - let id = self.identity.encode(); + let id = self.identity.clone(); T::KeyOwnerProofSystem::check_proof((PARACHAIN_KEY_TYPE_ID, id), self.proof.clone()) .ok_or(DoubleVoteValidityError::InvalidProof)?; @@ -251,7 +251,7 @@ pub trait Trait: attestations::Trait + session::historical::Trait { /// Compute and check proofs of historical key owners. type KeyOwnerProofSystem: KeyOwnerProofSystem< - (KeyTypeId, Vec), + (KeyTypeId, ValidatorId), Proof = Self::Proof, IdentificationTuple = Self::IdentificationTuple, >; @@ -486,7 +486,7 @@ decl_module! { pub fn report_double_vote( origin, report: DoubleVoteReport< - )>>::Proof, + >::Proof, >, ) -> DispatchResult { let reporter = ensure_signed(origin)?; @@ -500,7 +500,7 @@ decl_module! { // We have already checked this proof in `SignedExtension`, but we need // this here to get the full identification of the offender. let offender = T::KeyOwnerProofSystem::check_proof( - (PARACHAIN_KEY_TYPE_ID, identity.encode()), + (PARACHAIN_KEY_TYPE_ID, identity), proof, ).ok_or("Invalid/outdated key ownership proof.")?; @@ -1468,8 +1468,10 @@ mod tests { type Registrar = registrar::Module; type MaxCodeSize = MaxCodeSize; type MaxHeadDataSize = MaxHeadDataSize; - type Proof = )>>::Proof; - type IdentificationTuple = )>>::IdentificationTuple; + type Proof = + >::Proof; + type IdentificationTuple = + >::IdentificationTuple; type ReportOffence = Offences; type BlockHashConversion = sp_runtime::traits::Identity; type KeyOwnerProofSystem = Historical;