@@ -9,7 +9,7 @@ use fjall::{Keyspace, Partition, PartitionCreateOptions};
99use minicbor:: { decode, to_vec} ;
1010use rayon:: iter:: { IntoParallelIterator , ParallelIterator } ;
1111use tokio:: sync:: Mutex ;
12- use tracing:: { debug, error, info } ;
12+ use tracing:: { debug, error} ;
1313
1414use crate :: state:: { AccountEntry , ActiveStakeHistory , HistoricalAccountsConfig , RewardHistory } ;
1515
@@ -61,10 +61,14 @@ impl ImmutableHistoricalAccountStore {
6161 /// and addresses into their respective Fjall partitions for an entire epoch.
6262 /// Skips any partitions that have already stored the given epoch.
6363 /// All writes are batched and committed atomically, preventing on-disk corruption in case of failure.
64- pub async fn persist_epoch ( & self , epoch : u32 , config : & HistoricalAccountsConfig ) -> Result < ( ) > {
64+ pub async fn persist_epoch (
65+ & self ,
66+ epoch : u32 ,
67+ config : & HistoricalAccountsConfig ,
68+ ) -> Result < u64 > {
6569 if !config. any_enabled ( ) {
6670 debug ! ( "no persistence needed for epoch {epoch} (disabled)" , ) ;
67- return Ok ( ( ) ) ;
71+ return Ok ( 0 ) ;
6872 }
6973
7074 let drained_blocks = {
@@ -135,10 +139,7 @@ impl ImmutableHistoricalAccountStore {
135139 }
136140
137141 match batch. commit ( ) {
138- Ok ( _) => {
139- info ! ( "committed {change_count} account changes for epoch {epoch}" ) ;
140- Ok ( ( ) )
141- }
142+ Ok ( _) => Ok ( change_count) ,
142143 Err ( e) => {
143144 error ! ( "batch commit failed for epoch {epoch}: {e}" ) ;
144145 Err ( e. into ( ) )
0 commit comments