Merge pull request #77 from gavofyork/evm_factory
renamed VmFactory -> Factory
This commit is contained in:
commit
27f6d6a99c
@ -3,9 +3,9 @@
|
||||
use evm::Evm;
|
||||
|
||||
/// Evm factory. Creates appropriate Evm.
|
||||
pub struct VmFactory;
|
||||
pub struct Factory;
|
||||
|
||||
impl VmFactory {
|
||||
impl Factory {
|
||||
/// Returns jit vm
|
||||
#[cfg(feature = "jit")]
|
||||
pub fn create() -> Box<Evm> {
|
||||
@ -21,5 +21,5 @@ impl VmFactory {
|
||||
|
||||
#[test]
|
||||
fn test_create_vm() {
|
||||
let _vm = VmFactory::create();
|
||||
let _vm = Factory::create();
|
||||
}
|
@ -2,16 +2,12 @@
|
||||
|
||||
pub mod ext;
|
||||
pub mod evm;
|
||||
pub mod vmfactory;
|
||||
//pub mod logentry;
|
||||
pub mod factory;
|
||||
pub mod schedule;
|
||||
#[cfg(feature = "jit" )]
|
||||
mod jit;
|
||||
|
||||
// TODO: Error -> evm::Error, Result -> evm::Result
|
||||
pub use self::evm::{Evm, Error, Result};
|
||||
pub use self::ext::Ext;
|
||||
// TODO: VmFactory -> evm::Factory
|
||||
// TODO: module rename vmfactory -> factory
|
||||
pub use self::vmfactory::VmFactory;
|
||||
pub use self::factory::Factory;
|
||||
pub use self::schedule::Schedule;
|
||||
|
@ -2,7 +2,7 @@
|
||||
use common::*;
|
||||
use state::*;
|
||||
use engine::*;
|
||||
use evm::{self, Schedule, VmFactory, Ext};
|
||||
use evm::{self, Schedule, Factory, Ext};
|
||||
|
||||
/// Returns new address created from address and given nonce.
|
||||
pub fn contract_address(address: &Address, nonce: &U256) -> Address {
|
||||
@ -184,7 +184,7 @@ impl<'a> Executive<'a> {
|
||||
} else if params.code.len() > 0 {
|
||||
// if destination is a contract, do normal message call
|
||||
let mut ext = Externalities::from_executive(self, params, substate, OutputPolicy::Return(output));
|
||||
let evm = VmFactory::create();
|
||||
let evm = Factory::create();
|
||||
evm.exec(¶ms, &mut ext)
|
||||
} else {
|
||||
// otherwise, nothing
|
||||
@ -202,7 +202,7 @@ impl<'a> Executive<'a> {
|
||||
self.state.transfer_balance(¶ms.sender, ¶ms.address, ¶ms.value);
|
||||
|
||||
let mut ext = Externalities::from_executive(self, params, substate, OutputPolicy::InitContract);
|
||||
let evm = VmFactory::create();
|
||||
let evm = Factory::create();
|
||||
evm.exec(¶ms, &mut ext)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user