Skip to content

Commit

Permalink
[genesis] release stdlib and reset test genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Jul 3, 2024
1 parent 0d55028 commit f69a468
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file modified crates/rooch-genesis/released/test
Binary file not shown.
Binary file modified frameworks/framework-release/released/1/stdlib
Binary file not shown.
7 changes: 4 additions & 3 deletions moveos/moveos-object-runtime/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use move_core_types::{
account_address::AccountAddress, gas_algebra::NumBytes, language_storage::ModuleId,
value::MoveTypeLayout, vm_status::StatusCode,
};
use move_vm_types::values::Value;
use move_vm_types::values::{StructRef, Value};
use moveos_types::{move_std::string::MoveString, moveos_std::timestamp::Timestamp};
use moveos_types::{moveos_std::object::TimestampObject, state::StateChangeSetV2};
use moveos_types::{
Expand Down Expand Up @@ -249,10 +249,11 @@ impl ObjectRuntime {
.get_loaded_object(&timestamp_id)
.expect("Failed to get timestamp object")
.expect("Timestamp object must exist");
let timestamp_value = timestamp_obj
let timestamp_ref = timestamp_obj
.borrow_value(None)
.expect("Failed to borrow timestamp value");
Timestamp::from_runtime_value(timestamp_value)
let struct_ref = timestamp_ref.value_as::<StructRef>().expect("Failed to get struct ref");
Timestamp::from_runtime_value(struct_ref.read_ref().expect("Failed to read timestamp value"))
.expect("Failed to convert timestamp value to timestamp")
}

Expand Down

0 comments on commit f69a468

Please sign in to comment.