Skip to content

Commit

Permalink
fix test cases in executor/stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjiao committed May 15, 2024
1 parent a092acd commit 65d0d45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ pub static G_TEST_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
),
genesis_key_pair: Some((Arc::new(genesis_private_key), genesis_public_key)),
time_service_type: TimeServiceType::MockTimeService,
stdlib_version: StdlibVersion::Version(11),
stdlib_version: StdlibVersion::Version(12),
dao_config: DaoConfig {
voting_delay: 60_000, // 1min
voting_period: 60 * 60 * 1000, // 1h
Expand All @@ -775,7 +775,7 @@ pub static G_DEV_CONFIG: Lazy<GenesisConfig> = Lazy::new(|| {
let mut gas_constant = G_TEST_GAS_CONSTANTS.clone();
gas_constant.min_price_per_gas_unit = 1;

let stdlib_version = StdlibVersion::Version(11);
let stdlib_version = StdlibVersion::Version(12);
GenesisConfig {
genesis_block_parameter: GenesisBlockParameterConfig::Static(GenesisBlockParameter {
parent_hash: HashValue::sha3_256_of(b"starcoin_dev"),
Expand Down
2 changes: 1 addition & 1 deletion vm/starcoin-transactional-test-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ impl<'a> StarcoinTestAdapter<'a> {
number: Option<u64>,
uncles: Option<u64>,
) -> Result<(Option<String>, Option<Value>)> {
// use BlockMetadataV2 instead of BlockMetaData since stdlib version(13)
// use BlockMetadataV2 instead of BlockMetaData since stdlib version(12)
let last_blockmeta = self
.context
.storage
Expand Down
4 changes: 1 addition & 3 deletions vm/stdlib/tests/package_init_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ fn test_package_init_function() -> Result<()> {
"./compiled/10/9-10/stdlib.blob",
"./compiled/11/10-11/stdlib.blob",
"./compiled/12/11-12/stdlib.blob",
"./compiled/13/12-13/stdlib.blob",
];

let init_strs = [
Expand All @@ -31,9 +30,8 @@ fn test_package_init_function() -> Result<()> {
"",
"",
"0x00000000000000000000000000000001::StdlibUpgradeScripts::upgrade_from_v11_to_v12",
"0x00000000000000000000000000000001::StdlibUpgradeScripts::upgrade_from_v12_to_v13",
];
for (i, version) in (2..=13).collect::<Vec<usize>>().into_iter().enumerate() {
for (i, version) in (2..=12).collect::<Vec<usize>>().into_iter().enumerate() {
let package_file = format!("{}/{}-{}/stdlib.blob", version, version - 1, version);
let package = COMPILED_MOVE_CODE_DIR
.get_file(package_file)
Expand Down

0 comments on commit 65d0d45

Please sign in to comment.