Skip to content

Commit cbb214e

Browse files
committed
cargo fmt
1 parent 92babbe commit cbb214e

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

crates/freeze/src/datasets/transactions.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl CollectByBlock for Transactions {
150150
schema,
151151
exclude_failed,
152152
block.header.timestamp as u32,
153-
gas_price
153+
gas_price,
154154
)?;
155155
}
156156
Ok(())
@@ -199,7 +199,7 @@ impl CollectByTransaction for Transactions {
199199
schema,
200200
exclude_failed,
201201
timestamp,
202-
gas_price
202+
gas_price,
203203
)?;
204204
Ok(())
205205
}
@@ -287,7 +287,9 @@ fn get_max_fee_per_gas(tx: &Transaction) -> Option<u64> {
287287
pub(crate) fn get_gas_price(block: &Block, tx: &Transaction) -> Option<u64> {
288288
match &tx.inner {
289289
alloy::consensus::TxEnvelope::Legacy(_) => tx.gas_price().map(|gas_price| gas_price as u64),
290-
alloy::consensus::TxEnvelope::Eip2930(_) => tx.gas_price().map(|gas_price| gas_price as u64),
290+
alloy::consensus::TxEnvelope::Eip2930(_) => {
291+
tx.gas_price().map(|gas_price| gas_price as u64)
292+
}
291293
_ => {
292294
let base_fee_per_gas = block.header.inner.base_fee_per_gas.unwrap();
293295
let priority_fee = std::cmp::min(

crates/freeze/src/multi_datasets/blocks_and_transactions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl CollectByTransaction for BlocksAndTransactions {
6565
schema,
6666
exclude_failed,
6767
timestamp,
68-
gas_price
68+
gas_price,
6969
)?;
7070
Ok(())
7171
}

crates/freeze/src/types/sources.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,16 @@ impl Source {
259259

260260
// get transactions
261261
let txs = if include_transaction_hashes {
262-
let transactions = self.get_block(block as u64, BlockTransactionsKind::Hashes)
262+
let transactions = self
263+
.get_block(block as u64, BlockTransactionsKind::Hashes)
263264
.await?
264265
.ok_or(CollectError::CollectError("could not find block".to_string()))?
265266
.transactions;
266267
match transactions {
267-
BlockTransactions::Hashes(hashes) => hashes.into_iter().map(|tx| Some(tx.to_vec())).collect(),
268-
_ => return Err(CollectError::CollectError("wrong transaction format".to_string()))
268+
BlockTransactions::Hashes(hashes) => {
269+
hashes.into_iter().map(|tx| Some(tx.to_vec())).collect()
270+
}
271+
_ => return Err(CollectError::CollectError("wrong transaction format".to_string())),
269272
}
270273
} else {
271274
vec![None; result.len()]

0 commit comments

Comments
 (0)