diff --git a/common/src/transaction.rs b/common/src/transaction.rs index a02b692..e5056f5 100644 --- a/common/src/transaction.rs +++ b/common/src/transaction.rs @@ -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); } -} \ No newline at end of file +} diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index cb22626..9946504 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -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(), + }, ); }