mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-06 23:33:10 +00:00
test for same functionality
This commit is contained in:
parent
58e3ae53e9
commit
68371bb7ad
@ -99,7 +99,7 @@ impl AccountPublicMask {
|
||||
viewing_public_key_receiver: AffinePoint,
|
||||
data: &[u8],
|
||||
) -> (CipherText, Nonce) {
|
||||
ephemeral_key_holder.encrypt_data(viewing_public_key_receiver, data)
|
||||
Account::encrypt_data(ephemeral_key_holder, viewing_public_key_receiver, data)
|
||||
}
|
||||
|
||||
pub fn make_tag(&self) -> Tag {
|
||||
@ -236,6 +236,17 @@ mod tests {
|
||||
assert!(account.key_holder.address != [0u8; 32]); // Check if the address is not empty
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_new_mask_account() {
|
||||
let account = Account::new();
|
||||
|
||||
let mask = account.make_account_public_mask();
|
||||
|
||||
assert_eq!(mask.balance, 0);
|
||||
assert_eq!(mask.address, account.key_holder.address);
|
||||
assert_eq!(mask.make_tag(), account.make_tag());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_add_new_utxo_outputs() {
|
||||
let mut account = Account::new();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user