parity compiling fine
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#![warn(missing_docs)]
|
||||
#![cfg_attr(feature="dev", feature(plugin))]
|
||||
#![cfg_attr(feature="dev", plugin(clippy))]
|
||||
#![feature(augmented_assignments)]
|
||||
//#![feature(augmented_assignments)]
|
||||
// Keeps consistency (all lines with `.clone()`) and helpful when changing ref to non-ref.
|
||||
#![allow(clone_on_copy)]
|
||||
|
||||
@@ -59,7 +59,7 @@ use std::ops::*;
|
||||
use std::sync::*;
|
||||
use ethcore::client::Client;
|
||||
use util::network::{NetworkProtocolHandler, NetworkService, NetworkContext, PeerId};
|
||||
use util::io::TimerToken;
|
||||
use util::TimerToken;
|
||||
use chain::ChainSync;
|
||||
use ethcore::service::SyncMessage;
|
||||
use io::NetSyncIo;
|
||||
|
||||
@@ -213,7 +213,10 @@ impl BlockChainClient for TestBlockChainClient {
|
||||
}
|
||||
let len = self.numbers.read().unwrap().len();
|
||||
if number == len {
|
||||
*self.difficulty.write().unwrap().deref_mut() += header.difficulty;
|
||||
{
|
||||
let mut difficulty = self.difficulty.write().unwrap();
|
||||
*difficulty.deref_mut() = *difficulty.deref() + header.difficulty;
|
||||
}
|
||||
mem::replace(self.last_hash.write().unwrap().deref_mut(), h.clone());
|
||||
self.blocks.write().unwrap().insert(h.clone(), b);
|
||||
self.numbers.write().unwrap().insert(number, h.clone());
|
||||
|
||||
Reference in New Issue
Block a user