File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff 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> {
287287pub ( 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 (
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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( ) ]
You can’t perform that action at this time.
0 commit comments