Bumping clippy & fixing warnings (#1024)

* Bumping clippy

* Fixing warnings found by clippy
This commit is contained in:
Tomasz Drwięga
2016-05-02 13:13:12 +02:00
committed by Gav Wood
parent 7c2adc4137
commit e2465b1eab
17 changed files with 27 additions and 26 deletions

View File

@@ -10,7 +10,7 @@ authors = ["Ethcore <admin@ethcore.io"]
[dependencies]
ethcore-util = { path = "../util" }
ethcore = { path = "../ethcore" }
clippy = { version = "0.0.63", optional = true}
clippy = { version = "0.0.64", optional = true}
ethminer = { path = "../miner" }
log = "0.3"
env_logger = "0.3"

View File

@@ -26,7 +26,7 @@
/// Start with out best block and request headers from peer backwards until a common block is found
/// 3. Download headers and block bodies from peers in parallel.
/// As soon as a set of the blocks is fully downloaded at the head of the queue it is fed to the blockchain
/// 4. Maintain sync by handling NewBlocks/NewHashes messages
/// 4. Maintain sync by handling `NewBlocks/NewHashes` messages
///
use util::*;
@@ -114,7 +114,7 @@ pub enum SyncState {
Waiting,
/// Downloading blocks
Blocks,
/// Downloading blocks learned from NewHashes packet
/// Downloading blocks learned from `NewHashes` packet
NewBlocks,
}
@@ -557,7 +557,7 @@ impl ChainSync {
Ok(())
}
/// Handles NewHashes packet. Initiates headers download for any unknown hashes.
/// Handles `NewHashes` packet. Initiates headers download for any unknown hashes.
fn on_peer_new_hashes(&mut self, io: &mut SyncIo, peer_id: PeerId, r: &UntrustedRlp) -> Result<(), PacketDecodeError> {
if self.peers.get_mut(&peer_id).unwrap().asking != PeerAsking::Nothing {
trace!(target: "sync", "Ignoring new hashes since we're already downloading.");