File tree 2 files changed +6
-3
lines changed
bin/trin-execution/src/e2hs 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use alloy::{
2
2
consensus:: { transaction:: SignerRecoverable , TxEnvelope } ,
3
3
eips:: eip4895:: Withdrawal ,
4
4
} ;
5
+ use anyhow:: anyhow;
5
6
use ethportal_api:: {
6
7
consensus:: beacon_block:: {
7
8
SignedBeaconBlock , SignedBeaconBlockBellatrix , SignedBeaconBlockCapella ,
@@ -120,12 +121,12 @@ fn process_transactions(
120
121
. into_par_iter ( )
121
122
. map ( |transaction| {
122
123
transaction
123
- . recover_signer ( )
124
+ . recover_signer_unchecked ( )
124
125
. map ( |sender_address| TransactionsWithSender {
125
126
sender_address,
126
127
transaction,
127
128
} )
128
- . map_err ( |err| anyhow:: anyhow !( "Failed to recover signer: {err:?}" ) )
129
+ . map_err ( |err| anyhow ! ( "Failed to recover signer: {err:?}" ) )
129
130
} )
130
131
. collect :: < anyhow:: Result < Vec < _ > > > ( )
131
132
}
Original file line number Diff line number Diff line change 1
1
use std:: time:: Duration ;
2
2
3
3
use alloy:: { consensus:: transaction:: SignerRecoverable , primitives:: bytes:: Bytes } ;
4
+ use anyhow:: anyhow;
4
5
use e2store:: e2hs:: { BlockTuple , E2HSMemory , BLOCKS_PER_E2HS } ;
5
6
use rayon:: iter:: { IntoParallelRefIterator , ParallelIterator } ;
6
7
use reqwest:: Client ;
@@ -22,11 +23,12 @@ pub fn process_e2hs_file(raw_e2hs: &[u8]) -> anyhow::Result<ProcessedE2HS> {
22
23
. transactions
23
24
. par_iter ( )
24
25
. map ( |tx| {
25
- tx. recover_signer ( )
26
+ tx. recover_signer_unchecked ( )
26
27
. map ( |sender_address| TransactionsWithSender {
27
28
transaction : tx. clone ( ) ,
28
29
sender_address,
29
30
} )
31
+ . map_err ( |err| anyhow ! ( "Failed to e2hs recover signer: {err:?}" ) )
30
32
} )
31
33
. collect :: < Result < Vec < _ > , _ > > ( ) ?;
32
34
blocks. push ( ProcessedBlock {
You can’t perform that action at this time.
0 commit comments