Skip to content

Commit 74fa442

Browse files
committed
Cargo fmt.
1 parent 536d9f1 commit 74fa442

2 files changed

Lines changed: 34 additions & 37 deletions

File tree

crates/ethereum/primitives/src/receipt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ pub(super) mod serde_bincode_compat {
490490
mod compact {
491491
use super::*;
492492
use reth_codecs::{
493-
__private::{modular_bitfield::prelude::*, Buf},
494493
Compact,
494+
__private::{modular_bitfield::prelude::*, Buf},
495495
};
496496

497497
impl Receipt {

crates/seismic/txpool/src/screening/validator.rs

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ impl<V> ScreeningTransactionValidator<V> {
7272
impl<V> TransactionValidator for ScreeningTransactionValidator<V>
7373
where
7474
V: TransactionValidator,
75-
V::Transaction:
76-
PoolTransaction<Consensus: InputDecryptionElements> + alloy_consensus::Transaction + Typed2718,
75+
V::Transaction: PoolTransaction<Consensus: InputDecryptionElements>
76+
+ alloy_consensus::Transaction
77+
+ Typed2718,
7778
{
7879
type Transaction = V::Transaction;
7980

@@ -99,41 +100,37 @@ where
99100
// For non-Seismic txs, calldata is already plaintext — extract
100101
// addresses directly without cloning or decryption.
101102
// For Seismic txs, decrypt first so we can screen real calldata.
102-
let addresses =
103-
if valid_tx.transaction().ty() != SeismicTxType::Seismic as u8 {
104-
extract_addresses(valid_tx.transaction())
105-
} else {
106-
let consensus_tx = valid_tx.transaction().clone_into_consensus();
107-
let sender = *consensus_tx.signer_ref();
108-
match consensus_tx
109-
.inner()
110-
.plaintext_copy(&self.purpose_keys.tx_io_sk, sender)
111-
{
112-
Ok(plaintext_tx) => extract_addresses_with_input(
113-
valid_tx.transaction(),
114-
plaintext_tx.input(),
115-
),
116-
Err(err) => {
117-
// Decryption failed — skip screening entirely.
118-
// The tx enters the pool unscreened; the block
119-
// executor will catch it and charge gas.
120-
tracing::debug!(
121-
target: "txpool::screening",
122-
tx_hash = %valid_tx.hash(),
123-
%err,
124-
"skipping screening: calldata decryption failed"
125-
);
126-
return TransactionValidationOutcome::Valid {
127-
balance,
128-
state_nonce,
129-
transaction: valid_tx,
130-
propagate,
131-
bytecode_hash,
132-
authorities,
133-
};
134-
}
103+
let addresses = if valid_tx.transaction().ty() != SeismicTxType::Seismic as u8 {
104+
extract_addresses(valid_tx.transaction())
105+
} else {
106+
let consensus_tx = valid_tx.transaction().clone_into_consensus();
107+
let sender = *consensus_tx.signer_ref();
108+
match consensus_tx.inner().plaintext_copy(&self.purpose_keys.tx_io_sk, sender) {
109+
Ok(plaintext_tx) => extract_addresses_with_input(
110+
valid_tx.transaction(),
111+
plaintext_tx.input(),
112+
),
113+
Err(err) => {
114+
// Decryption failed — skip screening entirely.
115+
// The tx enters the pool unscreened; the block
116+
// executor will catch it and charge gas.
117+
tracing::debug!(
118+
target: "txpool::screening",
119+
tx_hash = %valid_tx.hash(),
120+
%err,
121+
"skipping screening: calldata decryption failed"
122+
);
123+
return TransactionValidationOutcome::Valid {
124+
balance,
125+
state_nonce,
126+
transaction: valid_tx,
127+
propagate,
128+
bytecode_hash,
129+
authorities,
130+
};
135131
}
136-
};
132+
}
133+
};
137134

138135
self.metrics
139136
.address_extraction_duration

0 commit comments

Comments
 (0)