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
This commit is contained in:
parent
6be5744be4
commit
a6d6adc57f
@ -75,7 +75,7 @@ trie-standardmap = { path = "../util/trie-standardmap" }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Display EVM debug traces.
|
# Display EVM debug traces.
|
||||||
evm-debug = ["slow-blocks"]
|
evm-debug = ["evm/evm-debug"]
|
||||||
# Display EVM debug traces when running tests.
|
# Display EVM debug traces when running tests.
|
||||||
evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"]
|
evm-debug-tests = ["evm-debug", "evm/evm-debug-tests"]
|
||||||
# Measure time of transaction execution.
|
# Measure time of transaction execution.
|
||||||
|
@ -39,7 +39,7 @@ mod inner {
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::time::{Instant, Duration};
|
use std::time::{Instant, Duration};
|
||||||
|
|
||||||
use bigint::prelude::U256;
|
use ethereum_types::U256;
|
||||||
|
|
||||||
use interpreter::stack::Stack;
|
use interpreter::stack::Stack;
|
||||||
use instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
|
use instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
|
||||||
|
@ -385,7 +385,7 @@ impl<'x> OpenBlock<'x> {
|
|||||||
let took = start.elapsed();
|
let took = start.elapsed();
|
||||||
let took_ms = took.as_secs() * 1000 + took.subsec_nanos() as u64 / 1000000;
|
let took_ms = took.as_secs() * 1000 + took.subsec_nanos() as u64 / 1000000;
|
||||||
if took > time::Duration::from_millis(slow_tx) {
|
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);
|
debug!(target: "tx", "Transaction {:?} took: {} ms", hash, took_ms);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user