@@ -154,7 +154,7 @@ impl Actor for SenderAllocation {
154154 }
155155
156156 // update unaggregated_fees
157- state. unaggregated_fees = state. refresh_all_database ( ) . await ?;
157+ state. unaggregated_fees = state. recalculate_all_unaggregated_fees ( ) . await ?;
158158
159159 sender_account_ref. cast ( SenderAccountMessage :: UpdateReceiptFees (
160160 allocation_id,
@@ -188,7 +188,7 @@ impl Actor for SenderAllocation {
188188 "Closing SenderAllocation, triggering last rav" ,
189189 ) ;
190190 loop {
191- match state. refresh_all_database ( ) . await {
191+ match state. recalculate_all_unaggregated_fees ( ) . await {
192192 Ok ( value) => {
193193 state. unaggregated_fees = value;
194194 break ;
@@ -366,7 +366,7 @@ impl SenderAllocationState {
366366 } )
367367 }
368368
369- async fn refresh_all_database ( & self ) -> Result < UnaggregatedReceipts > {
369+ async fn recalculate_all_unaggregated_fees ( & self ) -> Result < UnaggregatedReceipts > {
370370 self . calculate_fee_until_last_id ( i64:: MAX ) . await
371371 }
372372
@@ -1408,7 +1408,7 @@ pub mod tests {
14081408 }
14091409
14101410 // calculate unaggregated fee
1411- let total_unaggregated_fees = state. refresh_all_database ( ) . await . unwrap ( ) ;
1411+ let total_unaggregated_fees = state. recalculate_all_unaggregated_fees ( ) . await . unwrap ( ) ;
14121412
14131413 // Check that the unaggregated fees are correct.
14141414 assert_eq ! ( total_unaggregated_fees. value, 45u128 ) ;
@@ -1463,7 +1463,7 @@ pub mod tests {
14631463 . unwrap ( ) ;
14641464 }
14651465
1466- let total_unaggregated_fees = state. refresh_all_database ( ) . await . unwrap ( ) ;
1466+ let total_unaggregated_fees = state. recalculate_all_unaggregated_fees ( ) . await . unwrap ( ) ;
14671467
14681468 // Check that the unaggregated fees are correct.
14691469 assert_eq ! ( total_unaggregated_fees. value, 35u128 ) ;
0 commit comments