mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
contract/deployooor: Avoid unnecessary db key serialization
This commit is contained in:
@@ -68,11 +68,7 @@ fn init_contract(cid: ContractId, _ix: &[u8]) -> ContractResult {
|
||||
}
|
||||
|
||||
// Update db version
|
||||
db_set(
|
||||
info_db,
|
||||
&serialize(&DEPLOY_CONTRACT_DB_VERSION),
|
||||
&serialize(&env!("CARGO_PKG_VERSION")),
|
||||
)?;
|
||||
db_set(info_db, DEPLOY_CONTRACT_DB_VERSION, &serialize(&env!("CARGO_PKG_VERSION")))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ pub const DEPLOY_CONTRACT_INFO_TREE: &str = "info";
|
||||
pub const DEPLOY_CONTRACT_LOCK_TREE: &str = "lock";
|
||||
|
||||
// These are keys inside the info tree
|
||||
pub const DEPLOY_CONTRACT_DB_VERSION: &str = "db_version";
|
||||
pub const DEPLOY_CONTRACT_DB_VERSION: &[u8] = b"db_version";
|
||||
|
||||
/// zkas derive circuit namespace
|
||||
pub const DEPLOY_CONTRACT_ZKAS_DERIVE_NS_V1: &str = "DeriveContractID";
|
||||
|
||||
Reference in New Issue
Block a user