mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-08 08:13:08 +00:00
fmt
This commit is contained in:
parent
f01be72d8f
commit
b16575b407
@ -215,7 +215,10 @@ mod tests {
|
||||
use secp256k1_zkp::{constants::SECRET_KEY_SIZE, Tweak};
|
||||
use sha2::{digest::FixedOutput, Digest};
|
||||
|
||||
use crate::{merkle_tree_public::TreeHashType, transaction::{Transaction, TxKind}};
|
||||
use crate::{
|
||||
merkle_tree_public::TreeHashType,
|
||||
transaction::{Transaction, TxKind},
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn test_transaction_hash_is_sha256_of_json_bytes() {
|
||||
@ -227,7 +230,7 @@ mod tests {
|
||||
utxo_commitments_created_hashes: vec![[13; 32]],
|
||||
nullifier_created_hashes: vec![[0; 32], [1; 32], [2; 32], [3; 32]],
|
||||
execution_proof_private: "loremipsum".to_string(),
|
||||
encoded_data: vec![(vec![255,255,255], vec![254, 254, 254], 1)],
|
||||
encoded_data: vec![(vec![255, 255, 255], vec![254, 254, 254], 1)],
|
||||
ephemeral_pub_key: vec![5; 32],
|
||||
commitment: vec![],
|
||||
tweak: Tweak::from_slice(&[7; SECRET_KEY_SIZE]).unwrap(),
|
||||
@ -246,4 +249,4 @@ mod tests {
|
||||
|
||||
assert_eq!(expected_hash, hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,7 +149,9 @@ impl SequencerCore {
|
||||
.any(|check| check);
|
||||
|
||||
if tx_tree_check {
|
||||
return Err(TransactionMalformationErrorKind::TxHashAlreadyPresentInTree { tx: tx.hash() });
|
||||
return Err(
|
||||
TransactionMalformationErrorKind::TxHashAlreadyPresentInTree { tx: tx.hash() },
|
||||
);
|
||||
}
|
||||
|
||||
if nullifier_tree_check {
|
||||
@ -160,7 +162,9 @@ impl SequencerCore {
|
||||
|
||||
if utxo_commitments_check {
|
||||
return Err(
|
||||
TransactionMalformationErrorKind::UTXOCommitmentAlreadyPresentInTree { tx: tx.hash() },
|
||||
TransactionMalformationErrorKind::UTXOCommitmentAlreadyPresentInTree {
|
||||
tx: tx.hash(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user