mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 20:39:10 +00:00
Add domain to all signature funcitons, modify validate_proof_of_possession()
This commit is contained in:
@@ -27,8 +27,8 @@ impl AggregateSignature {
|
||||
///
|
||||
/// Only returns `true` if the set of keys in the `AggregatePublicKey` match the set of keys
|
||||
/// that signed the `AggregateSignature`.
|
||||
pub fn verify(&self, msg: &[u8], aggregate_public_key: &AggregatePublicKey) -> bool {
|
||||
self.0.verify(msg, aggregate_public_key)
|
||||
pub fn verify(&self, msg: &[u8], domain: u64, aggregate_public_key: &AggregatePublicKey) -> bool {
|
||||
self.0.verify(msg, domain, aggregate_public_key)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ mod tests {
|
||||
let keypair = Keypair::random();
|
||||
|
||||
let mut original = AggregateSignature::new();
|
||||
original.add(&Signature::new(&[42, 42], &keypair.sk));
|
||||
original.add(&Signature::new(&[42, 42], 0, &keypair.sk));
|
||||
|
||||
let bytes = ssz_encode(&original);
|
||||
let (decoded, _) = AggregateSignature::ssz_decode(&bytes, 0).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user