From dca56738626040eb248afccedd135866476ecabf Mon Sep 17 00:00:00 2001 From: TomTaehoonKim Date: Mon, 20 Feb 2023 18:33:14 +0900 Subject: [PATCH] Fix to get commit hash by height and reserved state by commit hash --- repository/src/lib.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/repository/src/lib.rs b/repository/src/lib.rs index 581bb012..04b36764 100644 --- a/repository/src/lib.rs +++ b/repository/src/lib.rs @@ -180,8 +180,18 @@ impl DistributedRepository { format::from_semantic_commit(semantic_commit).map_err(|e| eyre!(e)) } - /// Returns the reserved state from the `finalized` branch. - pub async fn get_reserved_state(&self) -> Result { + pub async fn get_commit_hash_by_height( + &self, + _height: BlockHeight, + ) -> Result { + unimplemented!() + } + + /// Returns the reserved state at the given commit hash. + pub async fn get_reserved_state( + &self, + commit_hash: CommitHash, + ) -> Result { self.raw.read_reserved_state().await.map_err(|e| eyre!(e)) }