@@ -8,8 +8,8 @@ pub struct ECDSAConfig {
88}
99
1010#[ derive( Debug , Deserialize , Serialize ) ]
11- pub struct LastProcessedBlock {
12- pub last_processed_block : u64 ,
11+ pub struct LastAggregatedBlock {
12+ pub last_aggregated_block : u64 ,
1313}
1414
1515#[ derive( Debug , Deserialize , Serialize ) ]
@@ -19,7 +19,7 @@ pub struct Config {
1919 pub max_proofs_in_queue : u16 ,
2020 pub proof_aggregation_service_address : String ,
2121 pub aligned_service_manager_address : String ,
22- pub last_processed_block_filepath : String ,
22+ pub last_aggregated_block_filepath : String ,
2323 pub ecdsa : ECDSAConfig ,
2424}
2525
@@ -32,34 +32,34 @@ impl Config {
3232 Ok ( config)
3333 }
3434
35- pub fn get_last_processed_block ( & self ) -> Result < u64 , Box < dyn std:: error:: Error > > {
36- match File :: open ( & self . last_processed_block_filepath ) {
35+ pub fn get_last_aggregated_block ( & self ) -> Result < u64 , Box < dyn std:: error:: Error > > {
36+ match File :: open ( & self . last_aggregated_block_filepath ) {
3737 Err ( _) => {
3838 // if file doesn't exist, default 0
3939 Ok ( 0 )
4040 }
4141 Ok ( mut file) => {
4242 let mut contents = String :: new ( ) ;
4343 file. read_to_string ( & mut contents) ?;
44- let lpb: LastProcessedBlock = serde_json:: from_str ( & contents) ?;
45- Ok ( lpb. last_processed_block )
44+ let lpb: LastAggregatedBlock = serde_json:: from_str ( & contents) ?;
45+ Ok ( lpb. last_aggregated_block )
4646 }
4747 }
4848 }
4949
50- pub fn update_last_processed_block (
50+ pub fn update_last_aggregated_block (
5151 & self ,
52- last_processed_block : u64 ,
52+ last_aggregated_block : u64 ,
5353 ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
54- let last_processed_block_struct = LastProcessedBlock {
55- last_processed_block ,
54+ let last_processed_block_struct = LastAggregatedBlock {
55+ last_aggregated_block ,
5656 } ;
5757
5858 let mut file = OpenOptions :: new ( )
5959 . write ( true )
6060 . truncate ( true )
6161 . create ( true )
62- . open ( & self . last_processed_block_filepath ) ?;
62+ . open ( & self . last_aggregated_block_filepath ) ?;
6363
6464 let content = serde_json:: to_string ( & last_processed_block_struct) ?;
6565 file. write_all ( content. as_bytes ( ) ) ?;
0 commit comments