mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-03 17:54:28 +00:00
Fix SszBlock tests
This commit is contained in:
parent
24312f445e
commit
a1b826906a
@ -12,7 +12,6 @@ use super::block::{
|
|||||||
pub enum BlockValidatorError {
|
pub enum BlockValidatorError {
|
||||||
TooShort,
|
TooShort,
|
||||||
TooLong,
|
TooLong,
|
||||||
NoAttestationRecords,
|
|
||||||
BadPowHash,
|
BadPowHash,
|
||||||
SlotTooLow,
|
SlotTooLow,
|
||||||
SlotTooHigh,
|
SlotTooHigh,
|
||||||
@ -119,7 +118,7 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
SszBlock::from_slice(&ssz[..]),
|
SszBlock::from_slice(&ssz[..]),
|
||||||
Err(BlockValidatorError::NoAttestationRecords)
|
Err(BlockValidatorError::TooShort)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,9 +128,6 @@ mod tests {
|
|||||||
b.attestations = vec![AttestationRecord::zero()];
|
b.attestations = vec![AttestationRecord::zero()];
|
||||||
let ssz = get_block_ssz(&b);
|
let ssz = get_block_ssz(&b);
|
||||||
|
|
||||||
assert_eq!(
|
assert!(SszBlock::from_slice(&ssz[..]).is_ok());
|
||||||
SszBlock::from_slice(&ssz[..]),
|
|
||||||
Err(BlockValidatorError::NoAttestationRecords)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user