Skip to content

Commit

Permalink
StarcoinVM remove GAS_SCHEDULE_UPGRAD_VERSION_MASK (version 12) logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Apr 7, 2024
1 parent de5027c commit 224ee92
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions vm/vm-runtime/src/starcoin_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub struct StarcoinVM {

/// marking of stdlib version which includes vmconfig upgrades.
const VMCONFIG_UPGRADE_VERSION_MARK: u64 = 10;
const GAS_SCHEDULE_UPGRADE_VERSION_MARK: u64 = 12;
//const GAS_SCHEDULE_UPGRADE_VERSION_MARK: u64 = 12;

impl StarcoinVM {
#[cfg(feature = "metrics")]
Expand Down Expand Up @@ -197,9 +197,7 @@ impl StarcoinVM {
Some(GasSchedule::from(&gas_cost_table)),
"gas schedule from VMConfig",
)
} else if stdlib_version >= StdlibVersion::Version(VMCONFIG_UPGRADE_VERSION_MARK)
&& stdlib_version < StdlibVersion::Version(GAS_SCHEDULE_UPGRADE_VERSION_MARK)
{
} else {
debug!(
"stdlib version: {}, fetch VMConfig from onchain module",
stdlib_version
Expand Down Expand Up @@ -263,13 +261,6 @@ impl StarcoinVM {
Some(GasSchedule::from(&cost_table)),
"gas schedule from VMConfig",
)
} else {
debug!(
"stdlib version: {}, fetch schedule from onchain module GasSchedule",
stdlib_version
);
let gas_schedule = GasSchedule::fetch_config(&remote_storage)?;
(gas_schedule, "gas schedule from GasSchedule")
};
#[cfg(feature = "print_gas_info")]
match self.gas_schedule.as_ref() {
Expand Down

0 comments on commit 224ee92

Please sign in to comment.