mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-14 06:59:24 +00:00
Add tests for the premise of the Schnorr contract to the Schnorr crate
This commit is contained in:
@@ -37,7 +37,13 @@ impl PublicKey {
|
||||
None?;
|
||||
}
|
||||
|
||||
Some(PublicKey { A, x_coordinate: x_coordinate.into() })
|
||||
let x_coordinate: [u8; 32] = x_coordinate.into();
|
||||
// Returns None if the x-coordinate is 0
|
||||
// Such keys will never have their signatures able to be verified
|
||||
if x_coordinate == [0; 32] {
|
||||
None?;
|
||||
}
|
||||
Some(PublicKey { A, x_coordinate })
|
||||
}
|
||||
|
||||
/// The point for this public key.
|
||||
|
||||
Reference in New Issue
Block a user