diff --git a/Cargo.toml b/Cargo.toml index 913b4c5f2..f52f0dc85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,7 @@ json-tests = ["ethcore/json-tests"] stratum = ["ipc"] ethkey-cli = ["ethcore/ethkey-cli"] ethstore-cli = ["ethcore/ethstore-cli"] +evm-debug = ["ethcore/evm-debug"] [[bin]] path = "parity/main.rs" diff --git a/ethcore/src/evm/evm.rs b/ethcore/src/evm/evm.rs index 813819250..8d2202480 100644 --- a/ethcore/src/evm/evm.rs +++ b/ethcore/src/evm/evm.rs @@ -113,7 +113,10 @@ impl<'a> Finalize for Result> { } /// Cost calculation type. For low-gas usage we calculate costs using usize instead of U256 -pub trait CostType: ops::Mul + ops::Div + ops::Add + ops::Sub + ops::Shr + ops::Shl + cmp::Ord + Sized + From + Copy { +pub trait CostType: Sized + From + Copy + + ops::Mul + ops::Div + ops::Add +ops::Sub + + ops::Shr + ops::Shl + + cmp::Ord + fmt::Debug { /// Converts this cost into `U256` fn as_u256(&self) -> U256; /// Tries to fit `U256` into this `Cost` type diff --git a/ethcore/src/evm/interpreter/mod.rs b/ethcore/src/evm/interpreter/mod.rs index d1b9b18bc..e95fb943e 100644 --- a/ethcore/src/evm/interpreter/mod.rs +++ b/ethcore/src/evm/interpreter/mod.rs @@ -126,7 +126,7 @@ impl evm::Evm for Interpreter { gasometer.current_gas = gasometer.current_gas - gas_cost; evm_debug!({ - println!("[0x{:x}][{}(0x{:x}) Gas: {:x}\n Gas Before: {:x}", + println!("[0x{:x}][{}(0x{:x}) Gas: {:?}\n Gas Before: {:?}", reader.position, color(instruction, info.name), instruction,