Fix lints introduced in Rust 1.35
This commit is contained in:
parent
d72400cc9d
commit
6e5e1721f7
@ -98,7 +98,7 @@ impl ClientConfig {
|
|||||||
|
|
||||||
// Custom bootnodes
|
// Custom bootnodes
|
||||||
if let Some(boot_addresses_str) = args.value_of("boot-nodes") {
|
if let Some(boot_addresses_str) = args.value_of("boot-nodes") {
|
||||||
let mut boot_addresses_split = boot_addresses_str.split(",");
|
let boot_addresses_split = boot_addresses_str.split(",");
|
||||||
for boot_address in boot_addresses_split {
|
for boot_address in boot_addresses_split {
|
||||||
if let Ok(boot_address) = boot_address.parse::<Multiaddr>() {
|
if let Ok(boot_address) = boot_address.parse::<Multiaddr>() {
|
||||||
config.net_conf.boot_nodes.append(&mut vec![boot_address]);
|
config.net_conf.boot_nodes.append(&mut vec![boot_address]);
|
||||||
|
@ -124,8 +124,9 @@ impl<T: Store, E: EthSpec> BitwiseLMDGhost<T, E> {
|
|||||||
[log2_int((block_height - target_height - 1u64).as_u64()) as usize]
|
[log2_int((block_height - target_height - 1u64).as_u64()) as usize]
|
||||||
.get(&block_hash)
|
.get(&block_hash)
|
||||||
//TODO: Panic if we can't lookup and fork choice fails
|
//TODO: Panic if we can't lookup and fork choice fails
|
||||||
.expect("All blocks should be added to the ancestor log lookup table");
|
.expect("All blocks should be added to the ancestor log lookup table")
|
||||||
self.get_ancestor(*ancestor_lookup, target_height, &spec)
|
.clone();
|
||||||
|
self.get_ancestor(ancestor_lookup, target_height, &spec)
|
||||||
} {
|
} {
|
||||||
// add the result to the cache
|
// add the result to the cache
|
||||||
self.cache.insert(cache_key, ancestor);
|
self.cache.insert(cache_key, ancestor);
|
||||||
@ -151,7 +152,7 @@ impl<T: Store, E: EthSpec> BitwiseLMDGhost<T, E> {
|
|||||||
// these have already been weighted by balance
|
// these have already been weighted by balance
|
||||||
for (hash, votes) in latest_votes.iter() {
|
for (hash, votes) in latest_votes.iter() {
|
||||||
if let Some(ancestor) = self.get_ancestor(*hash, block_height, spec) {
|
if let Some(ancestor) = self.get_ancestor(*hash, block_height, spec) {
|
||||||
let current_vote_value = current_votes.get(&ancestor).unwrap_or_else(|| &0);
|
let current_vote_value = current_votes.get(&ancestor).unwrap_or_else(|| &0).clone();
|
||||||
current_votes.insert(ancestor, current_vote_value + *votes);
|
current_votes.insert(ancestor, current_vote_value + *votes);
|
||||||
total_vote_count += votes;
|
total_vote_count += votes;
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,9 @@ impl<T: Store, E: EthSpec> OptimizedLMDGhost<T, E> {
|
|||||||
[log2_int((block_height - target_height - 1u64).as_u64()) as usize]
|
[log2_int((block_height - target_height - 1u64).as_u64()) as usize]
|
||||||
.get(&block_hash)
|
.get(&block_hash)
|
||||||
//TODO: Panic if we can't lookup and fork choice fails
|
//TODO: Panic if we can't lookup and fork choice fails
|
||||||
.expect("All blocks should be added to the ancestor log lookup table");
|
.expect("All blocks should be added to the ancestor log lookup table")
|
||||||
self.get_ancestor(*ancestor_lookup, target_height, &spec)
|
.clone();
|
||||||
|
self.get_ancestor(ancestor_lookup, target_height, &spec)
|
||||||
} {
|
} {
|
||||||
// add the result to the cache
|
// add the result to the cache
|
||||||
self.cache.insert(cache_key, ancestor);
|
self.cache.insert(cache_key, ancestor);
|
||||||
@ -151,7 +152,7 @@ impl<T: Store, E: EthSpec> OptimizedLMDGhost<T, E> {
|
|||||||
// these have already been weighted by balance
|
// these have already been weighted by balance
|
||||||
for (hash, votes) in latest_votes.iter() {
|
for (hash, votes) in latest_votes.iter() {
|
||||||
if let Some(ancestor) = self.get_ancestor(*hash, block_height, spec) {
|
if let Some(ancestor) = self.get_ancestor(*hash, block_height, spec) {
|
||||||
let current_vote_value = current_votes.get(&ancestor).unwrap_or_else(|| &0);
|
let current_vote_value = current_votes.get(&ancestor).unwrap_or_else(|| &0).clone();
|
||||||
current_votes.insert(ancestor, current_vote_value + *votes);
|
current_votes.insert(ancestor, current_vote_value + *votes);
|
||||||
total_vote_count += votes;
|
total_vote_count += votes;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
use slot_clock;
|
use slot_clock;
|
||||||
|
|
||||||
use error_chain::{
|
use error_chain::error_chain;
|
||||||
error_chain, error_chain_processing, impl_error_chain_kind, impl_error_chain_processed,
|
|
||||||
impl_extract_backtrace,
|
|
||||||
};
|
|
||||||
|
|
||||||
error_chain! {
|
error_chain! {
|
||||||
links { }
|
links { }
|
||||||
|
Loading…
Reference in New Issue
Block a user