Skip to content

Commit

Permalink
Post-rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn-x2 committed Mar 7, 2024
1 parent dfe812f commit bfc7ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,39 +128,6 @@ impl<
}
}

#[cfg(test)]
impl<
RelayBlockNumber,
KiltDidKeyId,
KiltAccountId,
KiltBlockNumber,
KiltWeb3Name,
KiltLinkableAccountId,
ConsumerBlockNumber,
>
ParachainDipDidProof<
RelayBlockNumber,
KiltDidKeyId,
KiltAccountId,
KiltBlockNumber,
KiltWeb3Name,
KiltLinkableAccountId,
ConsumerBlockNumber,
> where
KiltDidKeyId: Default,
KiltBlockNumber: Default,
ConsumerBlockNumber: Default,
{
pub(crate) fn with_provider_head_proof(provider_head_proof: ProviderHeadStateProof<RelayBlockNumber>) -> Self {
Self {
provider_head_proof,
dip_commitment_proof: Default::default(),
dip_proof: Default::default(),
signature: Default::default(),
}
}
}

impl<
RelayBlockNumber,
KiltDidKeyId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ mod parachain_dip_did_proof {
// Remove last part of the blinded component to get an invalid proof
let (_, invalid_blinded_proof) = provider_head_proof.proof.split_last().unwrap();
let invalid_provider_head_proof = ProviderHeadStateProof {
proof: invalid_blinded_proof.iter().cloned().into(),
proof: invalid_blinded_proof.to_owned(),
..provider_head_proof
};
let proof =
Expand Down Expand Up @@ -384,7 +384,7 @@ mod dip_did_proof_with_verified_relay_state_root {
let (parachain_state_root, dip_commitment_proof) = get_dip_commitment_proof();
// Remove last part of the blinded component to get an invalid proof.
let (_, invalid_blinded_proof) = dip_commitment_proof.0.split_last().unwrap();
let invalid_dip_commitment_proof = DipCommitmentStateProof(invalid_blinded_proof.iter().cloned().into());
let invalid_dip_commitment_proof = DipCommitmentStateProof(invalid_blinded_proof.to_owned());
let proof =
DipDidProofWithVerifiedStateRoot::<_, (), (), (), (), (), ()>::with_state_root_and_dip_commitment_proof(
parachain_state_root,
Expand Down Expand Up @@ -534,9 +534,9 @@ mod dip_did_proof_with_verified_subject_commitment {
fn verify_dip_proof_invalid_proof() {
let proof =
DipDidProofWithVerifiedSubjectCommitment::<_, (), (), (), (), (), ()>::with_commitment_and_dip_proof(
H256::default(),
H256([100; 32]),
DidMerkleProof {
blinded: Default::default(),
blinded: vec![vec![100; 32]],
revealed: Default::default(),
},
);
Expand Down

0 comments on commit bfc7ae5

Please sign in to comment.