@@ -128,23 +128,16 @@ impl SubmitTask {
128
128
// Create the transaction request with the signature values
129
129
let tx: TransactionRequest = self . new_tx_request ( retry_count, resp, block) . await ?;
130
130
131
- // Simulate the transaction with a call to the host provider
132
- if let Some ( maybe_error) = self . sim_with_call ( & tx) . await {
133
- warn ! (
134
- error = ?maybe_error,
135
- "error in transaction simulation"
136
- ) ;
137
- maybe_error?;
131
+ // Simulate the transaction with a call to the host provider and report any errors
132
+ if let Err ( err) = self . sim_with_call ( & tx) . await {
133
+ warn ! ( %err, "error in transaction simulation" ) ;
138
134
}
139
135
140
136
Ok ( tx)
141
137
}
142
138
143
139
/// Simulates the transaction with a call to the host provider to check for reverts.
144
- async fn sim_with_call (
145
- & self ,
146
- tx : & TransactionRequest ,
147
- ) -> Option < Result < ControlFlow , eyre:: Error > > {
140
+ async fn sim_with_call ( & self , tx : & TransactionRequest ) -> eyre:: Result < ( ) > {
148
141
if let Err ( TransportError :: ErrorResp ( e) ) =
149
142
self . provider ( ) . call ( tx. clone ( ) ) . block ( BlockNumberOrTag :: Pending . into ( ) ) . await
150
143
{
@@ -154,23 +147,23 @@ impl SubmitTask {
154
147
. unwrap_or_default ( )
155
148
{
156
149
debug ! ( %e, "incorrect host block" ) ;
157
- return Some ( Ok ( ControlFlow :: Skip ) ) ;
150
+ bail ! ( e )
158
151
}
159
152
160
153
if e. as_revert_data ( )
161
154
. map ( |data| data. starts_with ( & Zenith :: BadSignature :: SELECTOR ) )
162
155
. unwrap_or_default ( )
163
156
{
164
157
debug ! ( %e, "bad signature" ) ;
165
- return Some ( Ok ( ControlFlow :: Skip ) ) ;
158
+ bail ! ( e )
166
159
}
167
160
168
161
if e. as_revert_data ( )
169
162
. map ( |data| data. starts_with ( & Zenith :: OneRollupBlockPerHostBlock :: SELECTOR ) )
170
163
. unwrap_or_default ( )
171
164
{
172
165
debug ! ( %e, "one rollup block per host block" ) ;
173
- return Some ( Ok ( ControlFlow :: Skip ) ) ;
166
+ bail ! ( e )
174
167
}
175
168
176
169
error ! (
@@ -179,11 +172,10 @@ impl SubmitTask {
179
172
data = ?e. data,
180
173
"unknown error in host transaction simulation call"
181
174
) ;
182
- return Some ( Ok ( ControlFlow :: Skip ) ) ;
175
+ bail ! ( e )
183
176
}
184
177
185
- debug ! ( ?tx, "successfully simulated transaction request" ) ;
186
- None
178
+ Ok ( ( ) )
187
179
}
188
180
189
181
/// Creates a transaction request for the blob with the given header and signature values.
0 commit comments