mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-19 10:23:07 +00:00
fix: suggestions fix 2
This commit is contained in:
parent
8a8c7f722b
commit
2fb8c2c87f
@ -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()?)
|
||||
}
|
||||
|
||||
|
||||
@ -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(())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user