mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 14:09:25 +00:00
add transaction and crypto unit tests
This commit is contained in:
@@ -10,8 +10,14 @@ use curve25519_dalek::{EdwardsPoint, Scalar};
|
||||
use crate::{io::*, generators::hash_to_point, primitives::keccak256_to_scalar};
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Zeroize)]
|
||||
struct Signature {
|
||||
pub(crate) struct Signature {
|
||||
#[cfg(test)]
|
||||
pub(crate) c: Scalar,
|
||||
#[cfg(test)]
|
||||
pub(crate) s: Scalar,
|
||||
#[cfg(not(test))]
|
||||
c: Scalar,
|
||||
#[cfg(not(test))]
|
||||
s: Scalar,
|
||||
}
|
||||
|
||||
@@ -32,6 +38,9 @@ impl Signature {
|
||||
/// This was used by the original Cryptonote transaction protocol and was deprecated with RingCT.
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Zeroize)]
|
||||
pub struct RingSignature {
|
||||
#[cfg(test)]
|
||||
pub(crate) sigs: Vec<Signature>,
|
||||
#[cfg(not(test))]
|
||||
sigs: Vec<Signature>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user