Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove native smart-contract backend. #1542

Merged
merged 19 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions vm/interpreter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,3 @@ pub use self::default_runtime::*;
pub use self::gas_tracker::*;
pub use self::rand::*;
pub use self::vm::*;

/// Temporary flag to switch backends.
/// https://github.com/ChainSafe/forest/pull/1403
/// Run `forest` with flag BACKEND set to `fvm`, `native` or `both`.
/// Defaults to running both backends to compare results.
#[derive(Eq, PartialEq, Clone, Copy, Debug)]
pub enum Backend {
FVM,
Native,
Both,
}

impl Backend {
pub fn get_backend_choice() -> Backend {
match std::env::var("BACKEND") {
Ok(backend) if backend.to_lowercase() == "fvm" => Backend::FVM,
Ok(backend) if backend.to_lowercase() == "native" => Backend::Native,
Ok(backend) if backend.to_lowercase() == "both" => Backend::Both,
_ => Backend::FVM,
}
}
}
Loading