CLI option for using JITEVM (#1103)
* easily configurable vm (in progress) * completely removed vm_factory from engine * --jitvm command line flag
This commit is contained in:
@@ -19,7 +19,7 @@ use common::*;
|
||||
use spec::*;
|
||||
use blockchain::{BlockChain, BlockChainConfig};
|
||||
use state::*;
|
||||
use evm::{Schedule, Factory};
|
||||
use evm::Schedule;
|
||||
use engine::*;
|
||||
use ethereum;
|
||||
use devtools::*;
|
||||
@@ -51,15 +51,13 @@ impl<T> GuardedTempResult<T> {
|
||||
}
|
||||
|
||||
pub struct TestEngine {
|
||||
factory: Factory,
|
||||
engine: Box<Engine>,
|
||||
max_depth: usize
|
||||
}
|
||||
|
||||
impl TestEngine {
|
||||
pub fn new(max_depth: usize, factory: Factory) -> TestEngine {
|
||||
pub fn new(max_depth: usize) -> TestEngine {
|
||||
TestEngine {
|
||||
factory: factory,
|
||||
engine: ethereum::new_frontier_test().engine,
|
||||
max_depth: max_depth
|
||||
}
|
||||
@@ -79,10 +77,6 @@ impl Engine for TestEngine {
|
||||
self.engine.builtins()
|
||||
}
|
||||
|
||||
fn vm_factory(&self) -> &Factory {
|
||||
&self.factory
|
||||
}
|
||||
|
||||
fn schedule(&self, _env_info: &EnvInfo) -> Schedule {
|
||||
let mut schedule = Schedule::new_frontier();
|
||||
schedule.max_depth = self.max_depth;
|
||||
|
||||
Reference in New Issue
Block a user