Fix tests on master (#2080)

Because of a bug in the test script, we didn't stopped CI when the main
tests are failed.
This commit is contained in:
Bastian Köcher
2020-12-07 15:47:39 +01:00
committed by GitHub
parent f4a6f9d9b2
commit d7047578e9
7 changed files with 77 additions and 50 deletions
+5
View File
@@ -231,6 +231,11 @@ impl<H: Clone> CommittedCandidateReceipt<H> {
pub fn hash(&self) -> CandidateHash where H: Encode {
self.to_plain().hash()
}
/// Does this committed candidate receipt corrensponds to the given [`CandidateReceipt`]?
pub fn corresponds_to(&self, receipt: &CandidateReceipt<H>) -> bool where H: PartialEq {
receipt.descriptor == self.descriptor && receipt.commitments_hash == self.commitments.hash()
}
}
impl PartialOrd for CommittedCandidateReceipt {