From 87e63636867e2982476d15209f239943ea8f3abe Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Fri, 30 May 2025 15:23:09 -0400 Subject: [PATCH] addblock id getter, deserialization of account and commintmant from snapshot --- node_core/src/chain_storage/block_store.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/node_core/src/chain_storage/block_store.rs b/node_core/src/chain_storage/block_store.rs index 2956381..d0356e3 100644 --- a/node_core/src/chain_storage/block_store.rs +++ b/node_core/src/chain_storage/block_store.rs @@ -56,6 +56,20 @@ impl NodeBlockStore { pub fn get_sc_sc_state(&self, sc_addr: &str) -> Result> { Ok(self.dbio.get_sc_sc_state(sc_addr)?) } + + pub fn get_snapshot_block_id(&self) -> Result { + Ok(self.dbio.get_snapshot_block_id()?) + } + + pub fn get_snapshot_account(&self) -> Result> { + Ok(serde_json::from_slice(&self.dbio.get_snapshot_account()?)?) + } + + pub fn get_snapshot_commitment(&self) -> Result> { + Ok(serde_json::from_slice(&self.dbio.get_snapshot_commitment()?)?) + } + + } #[cfg(test)]