mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 13:23:10 +00:00
improve attribute visibility
This commit is contained in:
parent
504eb00819
commit
2c0c417c22
@ -270,7 +270,7 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
let mut witness_set = WitnessSet::for_message(&message, &[&key1, &key2]);
|
||||
witness_set.signatures_and_public_keys[0].0 = Signature { value: [1; 64] };
|
||||
witness_set.signatures_and_public_keys[0].0 = Signature::new_for_tests([1; 64]);
|
||||
let tx = PublicTransaction::new(message, witness_set);
|
||||
let result = tx.validate_and_compute_post_states(&state);
|
||||
assert!(matches!(result, Err(NssaError::InvalidInput(_))))
|
||||
|
||||
@ -9,7 +9,7 @@ use rand::{RngCore, rngs::OsRng};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Signature {
|
||||
pub(crate) value: [u8; 64],
|
||||
value: [u8; 64],
|
||||
}
|
||||
|
||||
impl Signature {
|
||||
@ -50,6 +50,12 @@ mod tests {
|
||||
|
||||
use crate::{PublicKey, Signature, signature::bip340_test_vectors};
|
||||
|
||||
impl Signature {
|
||||
pub(crate) fn new_for_tests(value: [u8; 64]) -> Self {
|
||||
Self { value }
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_signature_generation_from_bip340_test_vectors() {
|
||||
for (i, test_vector) in bip340_test_vectors::test_vectors().into_iter().enumerate() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user