mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 13:53:12 +00:00
remove outdated common/sec/nullifier.rs file
This commit is contained in:
parent
0b44afa4f6
commit
e0fd94152a
@ -5,7 +5,6 @@ use sha2::{Digest, Sha256, digest::FixedOutput};
|
||||
pub mod block;
|
||||
pub mod commitment;
|
||||
pub mod execution_input;
|
||||
pub mod nullifier;
|
||||
pub mod rpc_primitives;
|
||||
pub mod sequencer_client;
|
||||
pub mod transaction;
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::TreeHashType;
|
||||
|
||||
//ToDo: Update Nullifier model, when it is clear
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
||||
///General nullifier object
|
||||
pub struct UTXONullifier {
|
||||
pub utxo_hash: TreeHashType,
|
||||
}
|
||||
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use sha2::{Digest, digest::FixedOutput};
|
||||
|
||||
pub type TreeHashType = [u8; 32];
|
||||
pub type HashType = [u8; 32];
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum NSSATransaction {
|
||||
@ -72,11 +72,11 @@ impl TryFrom<&EncodedTransaction> for NSSATransaction {
|
||||
|
||||
impl EncodedTransaction {
|
||||
/// Computes and returns the SHA-256 hash of the JSON-serialized representation of `self`.
|
||||
pub fn hash(&self) -> TreeHashType {
|
||||
pub fn hash(&self) -> HashType {
|
||||
let bytes_to_hash = borsh::to_vec(&self).unwrap();
|
||||
let mut hasher = sha2::Sha256::new();
|
||||
hasher.update(&bytes_to_hash);
|
||||
TreeHashType::from(hasher.finalize_fixed())
|
||||
HashType::from(hasher.finalize_fixed())
|
||||
}
|
||||
|
||||
pub fn log(&self) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user