@@ -11,7 +11,7 @@ use alloy::signers::Signer;
1111use alloy:: sol_types:: SolCall ;
1212use alloy:: transports:: TransportError ;
1313use alloy_primitives:: { FixedBytes , U256 } ;
14- use eyre:: { bail, eyre } ;
14+ use eyre:: bail;
1515use oauth2:: {
1616 basic:: BasicClient , basic:: BasicTokenType , reqwest:: http_client, AuthUrl , ClientId ,
1717 ClientSecret , EmptyExtraTokenFields , StandardTokenResponse , TokenResponse , TokenUrl ,
@@ -89,10 +89,10 @@ impl SubmitTask {
8989 #[ instrument( skip_all) ]
9090 async fn construct_sig_request ( & self , contents : & InProgressBlock ) -> eyre:: Result < SignRequest > {
9191 let ru_chain_id = U256 :: from ( self . config . ru_chain_id ) ;
92- let next_block_height = self . next_host_block_height ( ) . await ?;
92+ let block_height = self . host_block_height ( ) . await ?;
9393
9494 Ok ( SignRequest {
95- host_block_number : U256 :: from ( next_block_height ) ,
95+ host_block_number : U256 :: from ( block_height ) ,
9696 host_chain_id : U256 :: from ( self . config . host_chain_id ) ,
9797 ru_chain_id,
9898 gas_limit : U256 :: from ( self . config . rollup_block_gas_limit ) ,
@@ -114,10 +114,9 @@ impl SubmitTask {
114114 Ok ( TransactionRequest :: default ( ) . with_blob_sidecar ( sidecar) . with_input ( data) )
115115 }
116116
117- async fn next_host_block_height ( & self ) -> eyre:: Result < u64 > {
117+ async fn host_block_height ( & self ) -> eyre:: Result < u64 > {
118118 let result = self . provider . get_block_number ( ) . await ?;
119- let next = result. checked_add ( 1 ) . ok_or_else ( || eyre ! ( "next host block height overflow" ) ) ?;
120- Ok ( next)
119+ Ok ( result)
121120 }
122121
123122 async fn submit_transaction (
0 commit comments