mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 13:23:10 +00:00
fmt, clippy
This commit is contained in:
parent
3d240c72f8
commit
c3b2f4691b
@ -1,4 +1,4 @@
|
||||
use crate::{NullifierPublicKey, program::ProgramId};
|
||||
use crate::program::ProgramId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub type Nonce = u128;
|
||||
|
||||
@ -40,7 +40,8 @@ impl PrivacyPreservingCircuitOutput {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{
|
||||
account::{Account, AccountWithMetadata, FingerPrint}, Commitment, Nullifier, NullifierPublicKey
|
||||
Commitment, Nullifier, NullifierPublicKey,
|
||||
account::{Account, AccountWithMetadata, FingerPrint},
|
||||
};
|
||||
use risc0_zkvm::serde::from_slice;
|
||||
|
||||
@ -55,7 +56,7 @@ mod tests {
|
||||
data: b"test data".to_vec(),
|
||||
nonce: 18446744073709551614,
|
||||
},
|
||||
is_authorized: true,
|
||||
is_authorized: true,
|
||||
fingerprint: FingerPrint::new([0; 32]),
|
||||
},
|
||||
AccountWithMetadata {
|
||||
@ -65,7 +66,7 @@ mod tests {
|
||||
data: b"test data".to_vec(),
|
||||
nonce: 9999999999999999999999,
|
||||
},
|
||||
is_authorized: false,
|
||||
is_authorized: false,
|
||||
fingerprint: FingerPrint::new([1; 32]),
|
||||
},
|
||||
],
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use crate::account::{Account, AccountWithMetadata, FingerPrint};
|
||||
use crate::account::{Account, AccountWithMetadata};
|
||||
use risc0_zkvm::serde::Deserializer;
|
||||
use risc0_zkvm::{DeserializeOwned, guest::env};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@ -82,7 +82,6 @@ impl<'de> Deserialize<'de> for Address {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl From<&Address> for FingerPrint {
|
||||
fn from(address: &Address) -> Self {
|
||||
FingerPrint::new(address.value)
|
||||
@ -95,7 +94,6 @@ impl From<Address> for FingerPrint {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{Address, address::AddressError};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use nssa_core::{
|
||||
MembershipProof, NullifierPublicKey, NullifierSecretKey, PrivacyPreservingCircuitInput,
|
||||
PrivacyPreservingCircuitOutput, SharedSecretKey,
|
||||
account::{AccountWithMetadata, FingerPrint},
|
||||
account::AccountWithMetadata,
|
||||
program::{InstructionData, ProgramOutput},
|
||||
};
|
||||
use risc0_zkvm::{ExecutorEnv, InnerReceipt, Receipt, default_prover};
|
||||
@ -90,7 +90,7 @@ fn execute_and_prove_program(
|
||||
mod tests {
|
||||
use nssa_core::{
|
||||
Commitment, EncryptionScheme, Nullifier,
|
||||
account::{Account, AccountWithMetadata},
|
||||
account::{Account, AccountWithMetadata, FingerPrint},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use nssa_core::{
|
||||
account::{Account, AccountWithMetadata, FingerPrint},
|
||||
account::{Account, AccountWithMetadata},
|
||||
program::{InstructionData, ProgramId, ProgramOutput},
|
||||
};
|
||||
use program_methods::{AUTHENTICATED_TRANSFER_ELF, AUTHENTICATED_TRANSFER_ID};
|
||||
|
||||
@ -94,7 +94,7 @@ impl PublicTransaction {
|
||||
.map(|address| AccountWithMetadata {
|
||||
account: state.get_account_by_address(address),
|
||||
is_authorized: signer_addresses.contains(address),
|
||||
fingerprint: address.into()
|
||||
fingerprint: address.into(),
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user