mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-08 09:09:31 +00:00
ci: address fmt-rs, lint, and unit-tests failures from the merge
This commit is contained in:
parent
8517906025
commit
8a8bac8b69
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -27,7 +27,7 @@ use nssa::{
|
||||
public_transaction as putx,
|
||||
};
|
||||
use nssa_core::{
|
||||
MembershipProof, NullifierPublicKey, InputAccountIdentity,
|
||||
InputAccountIdentity, MembershipProof, NullifierPublicKey,
|
||||
account::{AccountWithMetadata, Nonce, data::Data},
|
||||
encryption::ViewingPublicKey,
|
||||
};
|
||||
|
||||
@ -29,7 +29,7 @@ pub enum InputAccountIdentity {
|
||||
/// commitment, ciphertext, or nullifier.
|
||||
Public,
|
||||
/// Init of an authorized standalone private account: no membership proof. The `pre_state`
|
||||
/// must be `Account::default()`. The account_id is derived as
|
||||
/// must be `Account::default()`. The `account_id` is derived as
|
||||
/// `AccountId::from((&NullifierPublicKey::from(nsk), identifier))` and matched against
|
||||
/// `pre_state.account_id`.
|
||||
PrivateAuthorizedInit {
|
||||
|
||||
@ -2177,14 +2177,16 @@ pub mod tests {
|
||||
let private_pda_account =
|
||||
AccountWithMetadata::new(Account::default(), false, AccountId::new([1; 32]));
|
||||
|
||||
let visibility_mask = [0, 3];
|
||||
let result = execute_and_prove(
|
||||
vec![public_account_1, private_pda_account],
|
||||
Program::serialize_instruction(10_u128).unwrap(),
|
||||
visibility_mask.to_vec(),
|
||||
vec![(npk, 0, shared_secret)],
|
||||
vec![],
|
||||
vec![None],
|
||||
vec![
|
||||
InputAccountIdentity::Public,
|
||||
InputAccountIdentity::PrivatePdaInit {
|
||||
npk,
|
||||
ssk: shared_secret,
|
||||
},
|
||||
],
|
||||
&program.into(),
|
||||
);
|
||||
|
||||
|
||||
@ -498,9 +498,7 @@ fn compute_circuit_output(
|
||||
);
|
||||
|
||||
let mut output_index = 0;
|
||||
for (account_identity, (pre_state, post_state)) in
|
||||
account_identities.iter().zip(states_iter)
|
||||
{
|
||||
for (account_identity, (pre_state, post_state)) in account_identities.iter().zip(states_iter) {
|
||||
match account_identity {
|
||||
InputAccountIdentity::Public => {
|
||||
output.public_pre_states.push(pre_state);
|
||||
@ -518,10 +516,7 @@ fn compute_circuit_output(
|
||||
let npk = NullifierPublicKey::from(nsk);
|
||||
let account_id = AccountId::from((&npk, *identifier));
|
||||
|
||||
assert_eq!(
|
||||
account_id, pre_state.account_id,
|
||||
"AccountId mismatch"
|
||||
);
|
||||
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
|
||||
assert!(
|
||||
pre_state.is_authorized,
|
||||
"Pre-state not authorized for authenticated private account"
|
||||
@ -562,10 +557,7 @@ fn compute_circuit_output(
|
||||
let npk = NullifierPublicKey::from(nsk);
|
||||
let account_id = AccountId::from((&npk, *identifier));
|
||||
|
||||
assert_eq!(
|
||||
account_id, pre_state.account_id,
|
||||
"AccountId mismatch"
|
||||
);
|
||||
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
|
||||
assert!(
|
||||
pre_state.is_authorized,
|
||||
"Pre-state not authorized for authenticated private account"
|
||||
@ -601,10 +593,7 @@ fn compute_circuit_output(
|
||||
);
|
||||
let account_id = AccountId::from((npk, *identifier));
|
||||
|
||||
assert_eq!(
|
||||
account_id, pre_state.account_id,
|
||||
"AccountId mismatch"
|
||||
);
|
||||
assert_eq!(account_id, pre_state.account_id, "AccountId mismatch");
|
||||
assert_eq!(
|
||||
pre_state.account,
|
||||
Account::default(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user