Skip to content

Commit df2ab1e

Browse files
committed
Add all change for backup
1 parent 854f634 commit df2ab1e

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

vm/e2e-tests/src/on_chain_configs.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Copyright (c) Starcoin
22
// SPDX-License-Identifier: Apache-2.0
33

4+
use crate::account::Account;
5+
use crate::executor::FakeExecutor;
46
use move_core_types::transaction_argument::{convert_txn_args, TransactionArgument};
57
use move_ir_compiler::Compiler;
68
use starcoin_vm_runtime::starcoin_vm::StarcoinVM;
7-
use starcoin_vm_types::genesis_config::StdlibVersion::Latest;
8-
use crate::executor::FakeExecutor;
9+
use starcoin_vm_types::genesis_config::StdlibVersion;
910
use starcoin_vm_types::on_chain_config::Version;
1011
use starcoin_vm_types::transaction::Script;
1112
use stdlib::{stdlib_compiled_modules, StdLibOptions};
12-
use crate::account::Account;
1313

1414
pub fn set_starcoin_version(executor: &mut FakeExecutor, version: Version) {
1515
let account =
@@ -39,23 +39,26 @@ main(account: signer, language_version: u8) {
3939
}
4040
"#;
4141

42+
let modules = stdlib_compiled_modules(StdLibOptions::Compiled(StdlibVersion::Latest));
4243
let compiler = Compiler {
43-
deps: stdlib_compiled_modules(StdLibOptions::Compiled(Latest))
44-
.iter()
45-
.collect(),
44+
deps: modules.iter().collect(),
4645
};
4746
compiler.into_script_blob(code).expect("Failed to compile")
4847
};
4948
// let account = Account::new_starcoin_root();
5049
let txn = account
5150
.transaction()
52-
.script(Script::new(script_body, vec![], convert_txn_args(&vec![TransactionArgument::U64(version.major)])))
51+
.script(Script::new(
52+
script_body,
53+
vec![],
54+
convert_txn_args(&vec![TransactionArgument::U64(version.major)]),
55+
))
5356
.sequence_number(0)
5457
.sign();
5558

5659
executor.new_block();
5760
executor.execute_and_apply(txn);
5861

5962
let new_vm = StarcoinVM::new(None);
60-
assert_eq!(new_vm.internals().version().unwrap(), version);
63+
assert_eq!(new_vm.get_version().unwrap(), version);
6164
}

vm/e2e-tests/src/versioning.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33

44
#![forbid(unsafe_code)]
55

6-
use starcoin_vm_types::genesis_config::StdlibVersion;
76
use crate::{account::Account, executor::FakeExecutor, utils};
87

98
/// The current version numbers that e2e tests should be run against.
109
// pub const CURRENT_RELEASE_VERSIONS: std::ops::RangeInclusive<u64> =
1110
// STARCOIN_MAX_KNOWN_VERSION.major..=STARCOIN_MAX_KNOWN_VERSION.major;
1211

13-
pub const CURRENT_RELEASE_VERSIONS: std::ops::RangeInclusive<u64> =
14-
1..=StdlibVersion::Latest;
12+
pub const CURRENT_RELEASE_VERSIONS: std::ops::RangeInclusive<u64> = 1..=12;
1513

1614
#[derive(Debug)]
1715
pub struct VersionedTestEnv {

vm/e2e-testsuite/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ starcoin-vm-runtime = { workspace = true }
3333
starcoin-vm-types = { workspace = true }
3434
starcoin-types = { workspace = true }
3535
starcoin-crypto = { workspace = true }
36+
37+
3638
#diem-keygen = { path = "../diem-keygen" }
3739
#starcoin-vm = { path = "../starcoin-vm" }
3840
#diem-framework-releases = { path = "../diem-framework/DPN/releases" }

vm/e2e-testsuite/src/tests/create_account.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use starcoin_language_e2e_tests::account::Account;
66
use starcoin_language_e2e_tests::common_transactions::create_account_txn;
77
use starcoin_language_e2e_tests::current_function_name;
88
use starcoin_language_e2e_tests::executor::FakeExecutor;
9-
use starcoin_types::account_config;
109
use starcoin_vm_types::transaction::TransactionStatus;
1110

1211
#[test]

vm/e2e-testsuite/src/tests/experimental.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// Copyright (c) The Diem Core Contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
// use diem_transaction_builder::experimental_stdlib::encode_create_account_script_function;
5-
// use diem_types::vm_status::StatusCode;
6-
// use starcoin_language_e2e_tests::{
7-
// account::Account, current_function_name, executor::FakeExecutor,
8-
// };
9-
104
use move_core_types::vm_status::StatusCode;
115
use starcoin_language_e2e_tests::account::Account;
126
use starcoin_language_e2e_tests::current_function_name;

vm/parallel-executor/src/scheduler.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::{
1010
atomic::{AtomicBool, AtomicUsize, Ordering},
1111
Arc, Condvar,
1212
},
13-
thread,
1413
};
1514

1615
// Type aliases.

0 commit comments

Comments
 (0)