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