mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Move PublicKey to store uncompressed bytes.
This is an optimisation that allows for faster hashing of a public key, however it adds a penalty to SSZ encoding because we need to go decompressed -> PublicKey -> compressed. The spec presently uses compressed bytes to store public keys, however I'm hoping it will change.
This commit is contained in:
@@ -33,7 +33,7 @@ impl Signature {
|
||||
|
||||
/// Verify the Signature against a PublicKey.
|
||||
pub fn verify(&self, msg: &[u8], domain: u64, pk: &PublicKey) -> bool {
|
||||
self.0.verify(msg, domain, pk.as_raw())
|
||||
self.0.verify(msg, domain, &pk.as_raw())
|
||||
}
|
||||
|
||||
/// Verify the Signature against a PublicKey, where the message has already been hashed.
|
||||
@@ -44,7 +44,7 @@ impl Signature {
|
||||
pk: &PublicKey,
|
||||
) -> bool {
|
||||
self.0
|
||||
.verify_hashed(x_real_hashed, x_imaginary_hashed, pk.as_raw())
|
||||
.verify_hashed(x_real_hashed, x_imaginary_hashed, &pk.as_raw())
|
||||
}
|
||||
|
||||
/// Returns the underlying signature.
|
||||
|
||||
Reference in New Issue
Block a user