diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index fc2f837ef..bd30e0fb6 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -140,10 +140,8 @@ impl<'a> Executive<'a> { let init_gas = t.gas - base_gas_required; // validate transaction nonce - if check_nonce { - if t.nonce != nonce { - return Err(From::from(ExecutionError::InvalidNonce { expected: nonce, got: t.nonce })); - } + if check_nonce && t.nonce != nonce { + return Err(From::from(ExecutionError::InvalidNonce { expected: nonce, got: t.nonce })); } // validate if transaction fits into given block diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index e5e232a98..1c0bb417f 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -67,6 +67,8 @@ pub struct Externalities<'a, T> where T: 'a + Tracer { } impl<'a, T> Externalities<'a, T> where T: 'a + Tracer { + + #[cfg_attr(feature="dev", allow(too_many_arguments))] /// Basic `Externalities` constructor. pub fn new(state: &'a mut State, env_info: &'a EnvInfo, diff --git a/ethcore/src/substate.rs b/ethcore/src/substate.rs index f643fea07..65b314663 100644 --- a/ethcore/src/substate.rs +++ b/ethcore/src/substate.rs @@ -19,7 +19,7 @@ use common::*; /// State changes which should be applied in finalize, /// after transaction is fully executed. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct Substate { /// Any accounts that have suicided. pub suicides: HashSet
, diff --git a/ethcore/src/trace/trace.rs b/ethcore/src/trace/trace.rs index b0e2e75f5..6a90aaf8a 100644 --- a/ethcore/src/trace/trace.rs +++ b/ethcore/src/trace/trace.rs @@ -17,7 +17,7 @@ //! Tracing datatypes. use common::*; -/// TraceCall result. +/// `TraceCall` result. #[derive(Debug, Clone, PartialEq, Default)] pub struct TraceCallResult { /// Gas used by call. @@ -26,7 +26,7 @@ pub struct TraceCallResult { pub output: Bytes, } -/// TraceCreate result. +/// `TraceCreate` result. #[derive(Debug, Clone, PartialEq)] pub struct TraceCreateResult { /// Gas used by create. diff --git a/parity/upgrade.rs b/parity/upgrade.rs index c9c98e174..da01c039e 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -22,6 +22,7 @@ use std::fs::File; use std::env; use std::io::{Read, Write}; +#[cfg_attr(feature="dev", allow(enum_variant_names))] #[derive(Debug)] pub enum Error { CannotLockVersionFile, @@ -107,16 +108,12 @@ fn with_locked_version