File tree Expand file tree Collapse file tree
aggregation_mode/src/backend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,18 +33,11 @@ impl Config {
3333 }
3434
3535 pub fn get_last_aggregated_block ( & self ) -> Result < u64 , Box < dyn std:: error:: Error > > {
36- match File :: open ( & self . last_aggregated_block_filepath ) {
37- Err ( _) => {
38- // if file doesn't exist, default 0
39- Ok ( 0 )
40- }
41- Ok ( mut file) => {
42- let mut contents = String :: new ( ) ;
43- file. read_to_string ( & mut contents) ?;
44- let lpb: LastAggregatedBlock = serde_json:: from_str ( & contents) ?;
45- Ok ( lpb. last_aggregated_block )
46- }
47- }
36+ let mut file = File :: open ( & self . last_aggregated_block_filepath ) ?;
37+ let mut contents = String :: new ( ) ;
38+ file. read_to_string ( & mut contents) ?;
39+ let lpb: LastAggregatedBlock = serde_json:: from_str ( & contents) ?;
40+ Ok ( lpb. last_aggregated_block )
4841 }
4942
5043 pub fn update_last_aggregated_block (
You can’t perform that action at this time.
0 commit comments