Skip to content

Commit

Permalink
update force-deploy pkg path
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed Apr 14, 2024
1 parent 6b57cc2 commit c5ac4ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions chain/force-upgrade/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ starcoin-types = { workspace = true }
starcoin-vm-types = { workspace = true }
starcoin-vm-runtime = { workspace = true }
starcoin-move-compiler = { workspace = true }
stdlib = { workspace = true }
include_dir = { workspace = true }

[dev-dependencies]
Expand Down
8 changes: 3 additions & 5 deletions chain/force-upgrade/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2

use anyhow::format_err;
use include_dir::{include_dir, Dir};
use starcoin_types::account::DEFAULT_EXPIRATION_TIME;
use starcoin_types::identifier::Identifier;
use starcoin_types::language_storage::ModuleId;
Expand All @@ -17,8 +16,7 @@ use starcoin_vm_types::{
genesis_config::ChainId,
transaction::{Package, RawUserTransaction, TransactionPayload},
};

pub const FORCE_UPGRADE_PACKAGE: Dir = include_dir!("../../vm/stdlib/compiled/12/11-12");
use stdlib::COMPILED_MOVE_CODE_DIR;

pub struct ForceUpgrade;

Expand All @@ -31,8 +29,8 @@ impl ForceUpgrade {
block_timestamp: u64,
chain_id: &ChainId,
) -> anyhow::Result<SignedUserTransaction> {
let package_file = "stdlib.blob".to_string();
let package = FORCE_UPGRADE_PACKAGE
let package_file = "12/11-12/stdlib.blob".to_string();
let package = COMPILED_MOVE_CODE_DIR
.get_file(package_file.clone())
.map(|file| {
bcs_ext::from_bytes::<Package>(file.contents())
Expand Down

0 comments on commit c5ac4ee

Please sign in to comment.