mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 04:13:00 +00:00
get tests passing (except one)
This commit is contained in:
@@ -32,6 +32,7 @@ pub enum AttestationValidationError {
|
||||
NonZeroTrailingBits,
|
||||
BadAggregateSignature,
|
||||
DBError(String),
|
||||
OutOfBoundsBitfieldIndex,
|
||||
}
|
||||
|
||||
/// The context against which some attestation should be validated.
|
||||
@@ -198,10 +199,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
fn bytes_for_bits(bits: usize) -> usize {
|
||||
(bits.saturating_sub(1) / 8) + 1
|
||||
}
|
||||
|
||||
impl From<ParentHashesError> for AttestationValidationError {
|
||||
fn from(e: ParentHashesError) -> Self {
|
||||
match e {
|
||||
@@ -242,6 +239,8 @@ impl From<SignatureVerificationError> for AttestationValidationError {
|
||||
AttestationValidationError::NoPublicKeyForValidator
|
||||
}
|
||||
SignatureVerificationError::DBError(s) => AttestationValidationError::DBError(s),
|
||||
SignatureVerificationError::OutOfBoundsBitfieldIndex
|
||||
=> AttestationValidationError::OutOfBoundsBitfieldIndex,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user