Tidy validation signatures

This commit is contained in:
Paul Hauner 2018-09-24 18:09:01 +10:00
parent 26537c1184
commit c55b94053b
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -18,7 +18,8 @@ pub enum SignatureVerificationError {
DBError(String),
}
fn verify_aggregate_signature_for_indices<T>(message: &[u8],
pub fn verify_aggregate_signature_for_indices<T>(
message: &[u8],
agg_sig: &AggregateSignature,
attestation_indices: &[usize],
bitfield: &Bitfield,
@ -68,6 +69,15 @@ mod tests {
use super::super::db::MemoryDB;
use std::sync::Arc;
/*
* Cases that still need testing:
*
* - No signatures.
* - Database failure.
* - Unknown validator index.
* - Extra validator on signature.
*/
#[test]
fn test_signature_verification() {
let message = "cats".as_bytes();