mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-05 23:03:06 +00:00
addblock id getter, deserialization of account and commintmant from snapshot
This commit is contained in:
parent
88da732d5c
commit
87e6363686
@ -56,6 +56,20 @@ impl NodeBlockStore {
|
||||
pub fn get_sc_sc_state(&self, sc_addr: &str) -> Result<Vec<DataBlob>> {
|
||||
Ok(self.dbio.get_sc_sc_state(sc_addr)?)
|
||||
}
|
||||
|
||||
pub fn get_snapshot_block_id(&self) -> Result<u64> {
|
||||
Ok(self.dbio.get_snapshot_block_id()?)
|
||||
}
|
||||
|
||||
pub fn get_snapshot_account(&self) -> Result<HashMap<[u8; 32], Account>> {
|
||||
Ok(serde_json::from_slice(&self.dbio.get_snapshot_account()?)?)
|
||||
}
|
||||
|
||||
pub fn get_snapshot_commitment(&self) -> Result<HashStorageMerkleTree<UTXOCommitment>> {
|
||||
Ok(serde_json::from_slice(&self.dbio.get_snapshot_commitment()?)?)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user