fix: suggestions fix 2

This commit is contained in:
Pravdyvy 2026-03-17 15:18:12 +02:00
parent 8a8c7f722b
commit 2fb8c2c87f
2 changed files with 9 additions and 2 deletions

View File

@ -99,7 +99,10 @@ impl IndexerStore {
Ok(self.dbio.calculate_state_for_id(block_id)?)
}
pub fn final_state_db(&self) -> Result<V02State> {
/// Recalculation of final state directly from DB
///
/// Used for indexer healthcheck
pub fn recalculate_final_state(&self) -> Result<V02State> {
Ok(self.dbio.final_state()?)
}

View File

@ -128,7 +128,11 @@ impl indexer_service_rpc::RpcServer for IndexerService {
async fn healthcheck(&self) -> Result<(), ErrorObjectOwned> {
// Checking, that indexer can calculate last state
let _ = self.indexer.store.final_state_db().map_err(db_error)?;
let _ = self
.indexer
.store
.recalculate_final_state()
.map_err(db_error)?;
Ok(())
}