Merge branch 'master' into mining

This commit is contained in:
Gav Wood 2016-02-29 15:04:50 +01:00
commit de645eb6a9

View File

@ -245,8 +245,8 @@ impl ChainSync {
start_block_number: self.starting_block,
last_imported_block_number: self.last_imported_block,
highest_block_number: self.highest_block,
blocks_received: match self.last_imported_block { None => 0, Some(x) => x - self.starting_block },
blocks_total: match self.highest_block { None => 0, Some(x) => x - self.starting_block },
blocks_received: match self.last_imported_block { Some(x) if x > self.starting_block => x - self.starting_block, _ => 0 },
blocks_total: match self.highest_block { Some(x) if x > self.starting_block => x - self.starting_block, _ => 0 },
num_peers: self.peers.len(),
num_active_peers: self.peers.values().filter(|p| p.asking != PeerAsking::Nothing).count(),
mem_used: