@@ -128,8 +128,6 @@ impl Logger {
128
128
impl edr_provider:: Logger < L1ChainSpec > for Logger {
129
129
type BlockchainError = BlockchainError < L1ChainSpec > ;
130
130
131
- type LoggerError = LoggerError ;
132
-
133
131
fn is_enabled ( & self ) -> bool {
134
132
self . collector . is_enabled
135
133
}
@@ -143,7 +141,7 @@ impl edr_provider::Logger<L1ChainSpec> for Logger {
143
141
spec_id : edr_eth:: SpecId ,
144
142
transaction : & transaction:: Signed ,
145
143
result : & edr_provider:: CallResult ,
146
- ) -> Result < ( ) , Self :: LoggerError > {
144
+ ) -> Result < ( ) , Box < dyn std :: error :: Error + Send + Sync > > {
147
145
self . collector . log_call ( spec_id, transaction, result) ;
148
146
149
147
Ok ( ( ) )
@@ -154,7 +152,7 @@ impl edr_provider::Logger<L1ChainSpec> for Logger {
154
152
spec_id : edr_eth:: SpecId ,
155
153
transaction : & transaction:: Signed ,
156
154
failure : & edr_provider:: EstimateGasFailure ,
157
- ) -> Result < ( ) , Self :: LoggerError > {
155
+ ) -> Result < ( ) , Box < dyn std :: error :: Error + Send + Sync > > {
158
156
self . collector
159
157
. log_estimate_gas ( spec_id, transaction, failure) ;
160
158
@@ -165,15 +163,19 @@ impl edr_provider::Logger<L1ChainSpec> for Logger {
165
163
& mut self ,
166
164
spec_id : edr_eth:: SpecId ,
167
165
mining_result : & edr_provider:: DebugMineBlockResult < L1ChainSpec , Self :: BlockchainError > ,
168
- ) -> Result < ( ) , Self :: LoggerError > {
169
- self . collector . log_interval_mined ( spec_id, mining_result)
166
+ ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync > > {
167
+ self . collector
168
+ . log_interval_mined ( spec_id, mining_result)
169
+ . map_err ( Box :: new) ?;
170
+
171
+ Ok ( ( ) )
170
172
}
171
173
172
174
fn log_mined_block (
173
175
& mut self ,
174
176
spec_id : edr_eth:: SpecId ,
175
177
mining_results : & [ edr_provider:: DebugMineBlockResult < L1ChainSpec , Self :: BlockchainError > ] ,
176
- ) -> Result < ( ) , Self :: LoggerError > {
178
+ ) -> Result < ( ) , Box < dyn std :: error :: Error + Send + Sync > > {
177
179
self . collector . log_mined_blocks ( spec_id, mining_results) ;
178
180
179
181
Ok ( ( ) )
@@ -184,7 +186,7 @@ impl edr_provider::Logger<L1ChainSpec> for Logger {
184
186
spec_id : edr_eth:: SpecId ,
185
187
transaction : & edr_evm:: transaction:: Signed ,
186
188
mining_results : & [ edr_provider:: DebugMineBlockResult < L1ChainSpec , Self :: BlockchainError > ] ,
187
- ) -> Result < ( ) , Self :: LoggerError > {
189
+ ) -> Result < ( ) , Box < dyn std :: error :: Error + Send + Sync > > {
188
190
self . collector
189
191
. log_send_transaction ( spec_id, transaction, mining_results) ;
190
192
@@ -194,8 +196,8 @@ impl edr_provider::Logger<L1ChainSpec> for Logger {
194
196
fn print_method_logs (
195
197
& mut self ,
196
198
method : & str ,
197
- error : Option < & ProviderError < LoggerError > > ,
198
- ) -> Result < ( ) , Self :: LoggerError > {
199
+ error : Option < & ProviderError > ,
200
+ ) -> Result < ( ) , Box < dyn std :: error :: Error + Send + Sync > > {
199
201
if let Some ( error) = error {
200
202
self . collector . state = LoggingState :: Empty ;
201
203
0 commit comments