mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 13:23:10 +00:00
fix: merge clippy fix
This commit is contained in:
parent
d9ced25e98
commit
872986926e
@ -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(
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user