File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
crates/services/gas_price_service/src/v1/da_source_adapter Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -77,17 +77,13 @@ where
7777 BlockCommitter : BlockCommitterApi ,
7878{
7979 async fn request_da_block_cost ( & mut self ) -> DaBlockCostsResult < DaBlockCosts > {
80- let raw_da_block_costs;
81-
82- if let Some ( last_value) = & self . last_raw_da_block_costs {
83- raw_da_block_costs = self
80+ let raw_da_block_costs = match self . last_raw_da_block_costs {
81+ Some ( ref last_value) => self
8482 . client
85- . get_costs_by_seqno ( last_value. sequence_number + 1 )
86- . await ?;
87- } else {
88- // we have to error if we cannot find the first set of costs
89- raw_da_block_costs = self . client . get_latest_costs ( ) . await ?;
83+ . get_costs_by_seqno ( last_value. sequence_number + 1 ) ,
84+ _ => self . client . get_latest_costs ( ) ,
9085 }
86+ . await ?;
9187
9288 let Some ( ref raw_da_block_costs) = raw_da_block_costs else {
9389 return Err ( anyhow ! ( "No response from block committer" ) )
You can’t perform that action at this time.
0 commit comments