mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Fixes to diff checks in EF tests
This commit is contained in:
@@ -127,8 +127,15 @@ impl<E: EthSpec> Case for SanityBlocks<E> {
|
||||
};
|
||||
compare_beacon_state_results_without_caches(&mut indiv_result, &mut expected)?;
|
||||
compare_beacon_state_results_without_caches(&mut bulk_result, &mut expected)?;
|
||||
check_state_diff(&self.pre, &self.post)?;
|
||||
|
||||
// Check state diff (requires fully built committee caches).
|
||||
let mut pre = self.pre.clone();
|
||||
pre.build_all_committee_caches(spec).unwrap();
|
||||
let post = self.post.clone().map(|mut post| {
|
||||
post.build_all_committee_caches(spec).unwrap();
|
||||
post
|
||||
});
|
||||
check_state_diff(&pre, &post)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +68,14 @@ impl<E: EthSpec> Case for SanitySlots<E> {
|
||||
.map(|_| state);
|
||||
|
||||
compare_beacon_state_results_without_caches(&mut result, &mut expected)?;
|
||||
check_state_diff(&self.pre, &self.post)
|
||||
|
||||
// Check state diff (requires fully built committee caches).
|
||||
let mut pre = self.pre.clone();
|
||||
pre.build_all_committee_caches(spec).unwrap();
|
||||
let post = self.post.clone().map(|mut post| {
|
||||
post.build_all_committee_caches(spec).unwrap();
|
||||
post
|
||||
});
|
||||
check_state_diff(&pre, &post)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user