From a6d6adc57f34b68809a8e729d66e03b6628daea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 22 Jun 2018 10:00:19 +0100 Subject: [PATCH] ethcore: fix compilation when using slow-blocks or evm-debug features (#8936) * ethcore: fix compilation when slow-blocks feature is enabled * ethcore: fix compilation when evm-debug feature is enabled --- ethcore/Cargo.toml | 2 +- ethcore/evm/src/interpreter/informant.rs | 2 +- ethcore/src/block.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index f3e109331..fe05badb4 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -75,7 +75,7 @@ trie-standardmap = { path = "../util/trie-standardmap" } [features] # Display EVM debug traces. -evm-debug = ["slow-blocks"] +evm-debug = ["evm/evm-debug"] # Display EVM debug traces when running tests. evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"] # Measure time of transaction execution. diff --git a/ethcore/evm/src/interpreter/informant.rs b/ethcore/evm/src/interpreter/informant.rs index ca04be844..8ae57a97f 100644 --- a/ethcore/evm/src/interpreter/informant.rs +++ b/ethcore/evm/src/interpreter/informant.rs @@ -39,7 +39,7 @@ mod inner { use std::collections::HashMap; use std::time::{Instant, Duration}; - use bigint::prelude::U256; + use ethereum_types::U256; use interpreter::stack::Stack; use instructions::{Instruction, InstructionInfo, INSTRUCTIONS}; diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 682171170..91de4d379 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -385,7 +385,7 @@ impl<'x> OpenBlock<'x> { let took = start.elapsed(); let took_ms = took.as_secs() * 1000 + took.subsec_nanos() as u64 / 1000000; if took > time::Duration::from_millis(slow_tx) { - warn!("Heavy ({} ms) transaction in block {:?}: {:?}", took_ms, block.header().number(), hash); + warn!("Heavy ({} ms) transaction in block {:?}: {:?}", took_ms, self.block.header().number(), hash); } debug!(target: "tx", "Transaction {:?} took: {} ms", hash, took_ms); }