@@ -13,7 +13,7 @@ use alloy::{
13
13
sol_types:: { SolCall , SolError } ,
14
14
transports:: TransportError ,
15
15
} ;
16
- use eyre:: { bail, eyre } ;
16
+ use eyre:: bail;
17
17
use init4_bin_base:: deps:: {
18
18
metrics:: { counter, histogram} ,
19
19
tracing:: { self , Instrument , debug, debug_span, error, info, instrument, warn} ,
@@ -105,15 +105,7 @@ impl SubmitTask {
105
105
Ok ( TransactionRequest :: default ( ) . with_blob_sidecar ( sidecar) . with_input ( data) )
106
106
}
107
107
108
- /// Returns the next host block height.
109
- async fn next_host_block_height ( & self ) -> eyre:: Result < u64 > {
110
- let result = self . provider ( ) . get_block_number ( ) . await ?;
111
- let next = result. checked_add ( 1 ) . ok_or_else ( || eyre ! ( "next host block height overflow" ) ) ?;
112
- debug ! ( next, "next host block height" ) ;
113
- Ok ( next)
114
- }
115
-
116
- /// Prepares and then sends the EIP-4844 transaction with a sidecar encoded with a rollup block to the network.
108
+ /// Prepares and sends the EIP-4844 transaction with a sidecar encoded with a rollup block to the network.
117
109
async fn submit_transaction (
118
110
& self ,
119
111
retry_count : usize ,
@@ -122,7 +114,7 @@ impl SubmitTask {
122
114
) -> eyre:: Result < ControlFlow > {
123
115
let tx = self . prepare_tx ( retry_count, resp, block) . await ?;
124
116
125
- self . send_transaction ( retry_count , resp, tx) . await
117
+ self . send_transaction ( resp, tx) . await
126
118
}
127
119
128
120
/// Prepares the transaction by extracting the signature components, creating the transaction
@@ -240,7 +232,6 @@ impl SubmitTask {
240
232
/// and any additionally configured broadcast providers.
241
233
async fn send_transaction (
242
234
& self ,
243
- retry_count : usize ,
244
235
resp : & SignResponse ,
245
236
tx : TransactionRequest ,
246
237
) -> Result < ControlFlow , eyre:: Error > {
@@ -254,10 +245,8 @@ impl SubmitTask {
254
245
let fut = spawn_provider_send ! ( self . provider( ) , & tx) ;
255
246
256
247
// spawn send_tx futures on retry attempts for all additional broadcast host_providers
257
- if retry_count > 0 {
258
- for host_provider in self . config . connect_additional_broadcast ( ) {
259
- spawn_provider_send ! ( & host_provider, & tx) ;
260
- }
248
+ for host_provider in self . config . connect_additional_broadcast ( ) {
249
+ spawn_provider_send ! ( & host_provider, & tx) ;
261
250
}
262
251
263
252
// send the in-progress transaction over the outbound_tx_channel
@@ -393,6 +382,12 @@ impl SubmitTask {
393
382
let now = std:: time:: SystemTime :: now ( ) ;
394
383
now. duration_since ( UNIX_EPOCH ) . unwrap ( ) . as_secs ( )
395
384
}
385
+
386
+ /// Returns the next host block height.
387
+ async fn next_host_block_height ( & self ) -> eyre:: Result < u64 > {
388
+ let block_num = self . provider ( ) . get_block_number ( ) . await ?;
389
+ Ok ( block_num + 1 )
390
+ }
396
391
397
392
/// Task future for the submit task
398
393
/// NB: This task assumes that the simulator will only send it blocks for
0 commit comments