Merge branch 'master' into issue/96/beacon-block-update

This commit is contained in:
Paul Hauner 2018-12-26 09:03:04 +11:00
commit 926bdcde34
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C
2 changed files with 2 additions and 20 deletions

View File

@ -24,15 +24,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], avk: &AggregatePublicKey) -> bool {
self.0.verify(msg, avk)
}
}
impl Default for AggregateSignature {
/// A "default" signature is a signature across an empty message by a secret key of 48 zeros.
fn default() -> Self {
AggregateSignature::new()
pub fn verify(&self, msg: &[u8], aggregate_public_key: &AggregatePublicKey) -> bool {
self.0.verify(msg, aggregate_public_key)
}
}

View File

@ -36,17 +36,6 @@ impl Signature {
}
}
impl Default for Signature {
/// A "default" signature is a signature across an empty message by a secret key of 48 zeros.
fn default() -> Self {
let sk = match SecretKey::from_bytes(&[0; 48]) {
Ok(key) => key,
_ => unreachable!(), // Key is static, should not fail.
};
Signature(RawSignature::new(&[], &sk))
}
}
impl Encodable for Signature {
fn ssz_append(&self, s: &mut SszStream) {
s.append_vec(&self.0.as_bytes());