fix: merge clippy fix

This commit is contained in:
Oleksandr Pravdyvyi 2025-07-23 17:44:40 +03:00
parent d9ced25e98
commit 872986926e
No known key found for this signature in database
GPG Key ID: 9F8955C63C443871
2 changed files with 12 additions and 6 deletions

View File

@ -61,7 +61,7 @@ impl AddressKeyHolder {
pub fn get_pub_account_signing_key(&self) -> SigningKey {
let field_bytes = FieldBytes::from_slice(&self.pub_account_signing_key);
// TODO: remove unwrap
SigningKey::from_bytes(&field_bytes).unwrap()
SigningKey::from_bytes(field_bytes).unwrap()
}
pub fn calculate_shared_secret_receiver(

View File

@ -92,12 +92,18 @@ impl SequencerCore {
let tx_hash = *tx.hash();
let mempool_size = self.mempool.len();
if mempool_size >= self.sequencer_config.max_num_tx_in_block {
return Err(TransactionMalformationErrorKind::MempoolFullForRound { tx: tx_hash });
}
let curr_sequencer_roots = self.get_tree_roots();
if tx_roots != curr_sequencer_roots {
return Err(
TransactionMalformationErrorKind::ChainStateFurtherThanTransactionState {
tx: hash,
tx: tx_hash,
},
);
}
@ -111,7 +117,7 @@ impl SequencerCore {
//Public transactions can not make private operations.
return Err(
TransactionMalformationErrorKind::PublicTransactionChangedPrivateData {
tx: hash,
tx: tx_hash,
},
);
}
@ -123,7 +129,7 @@ impl SequencerCore {
//between public and private state.
return Err(
TransactionMalformationErrorKind::PrivateTransactionChangedPublicData {
tx: hash,
tx: tx_hash,
},
);
}
@ -132,7 +138,7 @@ impl SequencerCore {
};
//Tree checks
let tx_tree_check = self.store.pub_tx_store.get_tx(hash).is_some();
let tx_tree_check = self.store.pub_tx_store.get_tx(tx_hash).is_some();
let nullifier_tree_check = nullifier_created_hashes.iter().any(|nullifier_hash| {
self.store.nullifier_store.contains(&UTXONullifier {
utxo_hash: *nullifier_hash,
@ -232,7 +238,7 @@ impl SequencerCore {
.pop_size(self.sequencer_config.max_num_tx_in_block);
for tx in &transactions {
self.execute_check_transaction_on_state(&tx)?;
self.execute_check_transaction_on_state(tx)?;
}
let prev_block_hash = self