@@ -11,7 +11,7 @@ use alloy::signers::Signer;
11
11
use alloy:: sol_types:: SolCall ;
12
12
use alloy:: transports:: TransportError ;
13
13
use alloy_primitives:: { FixedBytes , U256 } ;
14
- use eyre:: { bail, eyre } ;
14
+ use eyre:: bail;
15
15
use oauth2:: {
16
16
basic:: BasicClient , basic:: BasicTokenType , reqwest:: http_client, AuthUrl , ClientId ,
17
17
ClientSecret , EmptyExtraTokenFields , StandardTokenResponse , TokenResponse , TokenUrl ,
@@ -89,10 +89,10 @@ impl SubmitTask {
89
89
#[ instrument( skip_all) ]
90
90
async fn construct_sig_request ( & self , contents : & InProgressBlock ) -> eyre:: Result < SignRequest > {
91
91
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 ?;
93
93
94
94
Ok ( SignRequest {
95
- host_block_number : U256 :: from ( next_block_height ) ,
95
+ host_block_number : U256 :: from ( block_height ) ,
96
96
host_chain_id : U256 :: from ( self . config . host_chain_id ) ,
97
97
ru_chain_id,
98
98
gas_limit : U256 :: from ( self . config . rollup_block_gas_limit ) ,
@@ -114,10 +114,9 @@ impl SubmitTask {
114
114
Ok ( TransactionRequest :: default ( ) . with_blob_sidecar ( sidecar) . with_input ( data) )
115
115
}
116
116
117
- async fn next_host_block_height ( & self ) -> eyre:: Result < u64 > {
117
+ async fn host_block_height ( & self ) -> eyre:: Result < u64 > {
118
118
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)
121
120
}
122
121
123
122
async fn submit_transaction (
0 commit comments