Skip to content

Commit

Permalink
Bug fix: libra changed gas related Struct
Browse files Browse the repository at this point in the history
  • Loading branch information
liangping committed Apr 17, 2020
1 parent b9bcd5f commit 2ae77e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "move-runner"
version = "0.0.4"
version = "0.0.5"
authors = ["Ping <[email protected]>"]
edition = "2018"
description = "A Move VM simulator which allows developers to compile and run Move script/module on local computer. "
Expand Down Expand Up @@ -46,6 +46,7 @@ libra-crypto = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
libra-vm = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
move-ir-types = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
compiler = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
move-core-types= { git = "https://github.com/libra/libra.git", version = "0.1.0" }
move-vm-types= { git = "https://github.com/libra/libra.git", version = "0.1.0" }
bytecode-source-map = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
vm-genesis = { git = "https://github.com/libra/libra.git", version = "0.1.0" }
Expand Down
9 changes: 6 additions & 3 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ use std::path::PathBuf;
use bytecode_verifier::verifier::VerifiedModule;
use libra_config::config::{ExecutionConfig, RootPath};
use libra_types::transaction::{parse_as_transaction_argument, TransactionArgument, TransactionPayload};
use move_core_types::{
gas_schedule::{GasAlgebra, GasUnits},
};
use move_vm_runtime::MoveVM;
use move_vm_state::execution_context::{ExecutionContext, TransactionExecutionContext};
use move_vm_types::values::values_impl::Value;
use vm::{
errors::VMResult,
gas_schedule::{CostTable, GasAlgebra, GasUnits},
gas_schedule,
transaction_metadata::TransactionMetadata,
};

Expand Down Expand Up @@ -82,8 +85,8 @@ impl Command for RunCommand {
// create a Move VM and populate it with generated modules
let move_vm = MoveVM::new();
let mut ctx =
TransactionExecutionContext::new(GasUnits::new(1000), &m_runner.datastore);
let gas_schedule = CostTable::zero();
TransactionExecutionContext::new(GasUnits::new(600), &m_runner.datastore);
let gas_schedule = gas_schedule::zero_cost_schedule();

let mut txn_data = TransactionMetadata::default();
txn_data.sender = cfg.address();
Expand Down

0 comments on commit 2ae77e5

Please sign in to comment.