Fixing clippy warnings
This commit is contained in:
parent
58fd0175bf
commit
15a8860e8a
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -348,6 +348,7 @@ dependencies = [
|
|||||||
"libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mio 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"nix 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rocksdb 0.4.3 (git+https://github.com/arkpar/rust-rocksdb.git)",
|
"rocksdb 0.4.3 (git+https://github.com/arkpar/rust-rocksdb.git)",
|
||||||
"rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -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...");
|
||||||
|
@ -208,7 +208,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