Tidy validation signatures
This commit is contained in:
parent
26537c1184
commit
c55b94053b
@ -18,7 +18,8 @@ pub enum SignatureVerificationError {
|
|||||||
DBError(String),
|
DBError(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn verify_aggregate_signature_for_indices<T>(message: &[u8],
|
pub fn verify_aggregate_signature_for_indices<T>(
|
||||||
|
message: &[u8],
|
||||||
agg_sig: &AggregateSignature,
|
agg_sig: &AggregateSignature,
|
||||||
attestation_indices: &[usize],
|
attestation_indices: &[usize],
|
||||||
bitfield: &Bitfield,
|
bitfield: &Bitfield,
|
||||||
@ -68,6 +69,15 @@ mod tests {
|
|||||||
use super::super::db::MemoryDB;
|
use super::super::db::MemoryDB;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cases that still need testing:
|
||||||
|
*
|
||||||
|
* - No signatures.
|
||||||
|
* - Database failure.
|
||||||
|
* - Unknown validator index.
|
||||||
|
* - Extra validator on signature.
|
||||||
|
*/
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_signature_verification() {
|
fn test_signature_verification() {
|
||||||
let message = "cats".as_bytes();
|
let message = "cats".as_bytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user