Move attestation validator to BeaconState fn

This commit is contained in:
Paul Hauner
2019-01-27 17:54:26 +11:00
parent b487db68a1
commit fd47f6c433
4 changed files with 121 additions and 86 deletions

View File

@@ -40,3 +40,13 @@ pub fn create_proof_of_possession(keypair: &Keypair) -> Signature {
extend_if_needed(&mut hash);
Signature::new_hashed(&hash, &keypair.sk)
}
pub fn bls_verify_aggregate(
pubkey: &AggregatePublicKey,
message: &[u8],
signature: &AggregateSignature,
_domain: u64,
) -> bool {
// TODO: add domain
signature.verify(message, pubkey)
}