Merge pull request #1044 from ethcore/clippy-warnings
Fixing clippy warnings
This commit is contained in:
commit
ad00bd7bc8
@ -24,7 +24,7 @@ use engine::*;
|
|||||||
use evm::{Schedule, Factory};
|
use evm::{Schedule, Factory};
|
||||||
use ethjson;
|
use ethjson;
|
||||||
|
|
||||||
/// BasicAuthority params.
|
/// `BasicAuthority` params.
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub struct BasicAuthorityParams {
|
pub struct BasicAuthorityParams {
|
||||||
/// Gas limit divisor.
|
/// Gas limit divisor.
|
||||||
@ -45,7 +45,7 @@ impl From<ethjson::spec::BasicAuthorityParams> for BasicAuthorityParams {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Engine using BasicAuthority proof-of-work consensus algorithm, suitable for Ethereum
|
/// Engine using `BasicAuthority` proof-of-work consensus algorithm, suitable for Ethereum
|
||||||
/// mainnet chains in the Olympic, Frontier and Homestead eras.
|
/// mainnet chains in the Olympic, Frontier and Homestead eras.
|
||||||
pub struct BasicAuthority {
|
pub struct BasicAuthority {
|
||||||
params: CommonParams,
|
params: CommonParams,
|
||||||
@ -192,7 +192,7 @@ impl Header {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new test chain spec with BasicAuthority consensus engine.
|
/// Create a new test chain spec with `BasicAuthority` consensus engine.
|
||||||
pub fn new_test_authority() -> Spec { Spec::load(include_bytes!("../res/test_authority.json")) }
|
pub fn new_test_authority() -> Spec { Spec::load(include_bytes!("../res/test_authority.json")) }
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -42,7 +42,7 @@ use env_info::EnvInfo;
|
|||||||
use executive::{Executive, Executed, TransactOptions, contract_address};
|
use executive::{Executive, Executed, TransactOptions, contract_address};
|
||||||
use receipt::LocalizedReceipt;
|
use receipt::LocalizedReceipt;
|
||||||
pub use blockchain::CacheSize as BlockChainCacheSize;
|
pub use blockchain::CacheSize as BlockChainCacheSize;
|
||||||
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase, Filter as TracedbFilter};
|
use trace::{TraceDB, ImportRequest as TraceImportRequest, LocalizedTrace, Database as TraceDatabase};
|
||||||
use trace;
|
use trace;
|
||||||
|
|
||||||
/// General block status
|
/// General block status
|
||||||
|
@ -166,9 +166,9 @@ impl Miner {
|
|||||||
trace!(target: "miner", "prepare_sealing: block has transaction - attempting internal seal.");
|
trace!(target: "miner", "prepare_sealing: block has transaction - attempting internal seal.");
|
||||||
// block with transactions - see if we can seal immediately.
|
// block with transactions - see if we can seal immediately.
|
||||||
let a = self.accounts.read().unwrap();
|
let a = self.accounts.read().unwrap();
|
||||||
let s = chain.generate_seal(block.block(), match a.deref() {
|
let s = chain.generate_seal(block.block(), match *a.deref() {
|
||||||
&Some(ref x) => Some(x.deref() as &AccountProvider),
|
Some(ref x) => Some(x.deref() as &AccountProvider),
|
||||||
&None => None,
|
None => None,
|
||||||
});
|
});
|
||||||
if let Some(seal) = s {
|
if let Some(seal) = s {
|
||||||
trace!(target: "miner", "prepare_sealing: managed internal seal. importing...");
|
trace!(target: "miner", "prepare_sealing: managed internal seal. importing...");
|
||||||
|
@ -214,7 +214,7 @@ fn execute_client(conf: Configuration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn flush_stdout() {
|
fn flush_stdout() {
|
||||||
::std::io::stdout().flush().ok().expect("stdout is flushable; qed");
|
::std::io::stdout().flush().expect("stdout is flushable; qed");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn execute_account_cli(conf: Configuration) {
|
fn execute_account_cli(conf: Configuration) {
|
||||||
|
Loading…
Reference in New Issue
Block a user