mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 07:43:11 +00:00
add getters for account
This commit is contained in:
parent
ee26147dde
commit
611436a943
@ -468,6 +468,22 @@ impl RocksDBIO {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_snapshot_account(&self) -> DbResult<Vec<u8>> {
|
||||
let cf_snapshot = self.snapshot_column();
|
||||
let res = self
|
||||
.db
|
||||
.get_cf(&cf_snapshot, DB_SNAPSHOT_ACCOUNT_KEY)
|
||||
.map_err(|rerr| DbError::rocksdb_cast_message(rerr, None))?;
|
||||
|
||||
if let Some(data) = res {
|
||||
Ok(data)
|
||||
} else {
|
||||
Err(DbError::db_interaction_error(
|
||||
"Snapshot account not found".to_string(),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///Creates address for sc data blob at corresponding id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user