mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -633,18 +633,24 @@ mod tests {
|
||||
let value = Hash256::zero();
|
||||
|
||||
// Assert there is no entry.
|
||||
assert!(store
|
||||
.observation_for_validator(key, validator_index)
|
||||
.unwrap()
|
||||
.is_none());
|
||||
assert!(!store
|
||||
.validator_has_been_observed(key, validator_index)
|
||||
.unwrap());
|
||||
assert!(
|
||||
store
|
||||
.observation_for_validator(key, validator_index)
|
||||
.unwrap()
|
||||
.is_none()
|
||||
);
|
||||
assert!(
|
||||
!store
|
||||
.validator_has_been_observed(key, validator_index)
|
||||
.unwrap()
|
||||
);
|
||||
|
||||
// Add an entry.
|
||||
assert!(!store
|
||||
.observe_validator(key, validator_index, value)
|
||||
.unwrap());
|
||||
assert!(
|
||||
!store
|
||||
.observe_validator(key, validator_index, value)
|
||||
.unwrap()
|
||||
);
|
||||
|
||||
// Assert there is a correct entry.
|
||||
assert_eq!(
|
||||
@@ -653,9 +659,11 @@ mod tests {
|
||||
.unwrap(),
|
||||
Some(value)
|
||||
);
|
||||
assert!(store
|
||||
.validator_has_been_observed(key, validator_index)
|
||||
.unwrap());
|
||||
assert!(
|
||||
store
|
||||
.validator_has_been_observed(key, validator_index)
|
||||
.unwrap()
|
||||
);
|
||||
|
||||
let alternate_value = Hash256::from_low_u64_be(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user