Fix test compilation.
This commit is contained in:
parent
f24ba94fbd
commit
86ba6f1912
@ -130,7 +130,6 @@ impl Miner {
|
|||||||
next_allowed_reseal: Mutex::new(Instant::now()),
|
next_allowed_reseal: Mutex::new(Instant::now()),
|
||||||
sealing_block_last_request: Mutex::new(0),
|
sealing_block_last_request: Mutex::new(0),
|
||||||
sealing_work: Mutex::new(UsingQueue::new(options.work_queue_size)),
|
sealing_work: Mutex::new(UsingQueue::new(options.work_queue_size)),
|
||||||
options: options,
|
|
||||||
gas_range_target: RwLock::new((U256::zero(), U256::zero())),
|
gas_range_target: RwLock::new((U256::zero(), U256::zero())),
|
||||||
author: RwLock::new(Address::default()),
|
author: RwLock::new(Address::default()),
|
||||||
extra_data: RwLock::new(Vec::new()),
|
extra_data: RwLock::new(Vec::new()),
|
||||||
|
@ -60,6 +60,7 @@ fn miner_service(spec: Spec, accounts: Arc<AccountProvider>) -> Arc<Miner> {
|
|||||||
pending_set: PendingSet::SealingOrElseQueue,
|
pending_set: PendingSet::SealingOrElseQueue,
|
||||||
reseal_min_period: Duration::from_secs(0),
|
reseal_min_period: Duration::from_secs(0),
|
||||||
work_queue_size: 50,
|
work_queue_size: 50,
|
||||||
|
new_work_notify: vec![],
|
||||||
},
|
},
|
||||||
spec,
|
spec,
|
||||||
Some(accounts)
|
Some(accounts)
|
||||||
|
@ -88,7 +88,7 @@ impl NetworkProtocolHandler<TestProtocolMessage> for TestProtocol {
|
|||||||
|
|
||||||
/// Timer function called after a timeout created with `NetworkContext::timeout`.
|
/// Timer function called after a timeout created with `NetworkContext::timeout`.
|
||||||
fn timeout(&self, io: &NetworkContext<TestProtocolMessage>, timer: TimerToken) {
|
fn timeout(&self, io: &NetworkContext<TestProtocolMessage>, timer: TimerToken) {
|
||||||
io.message(TestProtocolMessage { payload: 22 });
|
io.message(TestProtocolMessage { payload: 22 }).unwrap();
|
||||||
assert_eq!(timer, 0);
|
assert_eq!(timer, 0);
|
||||||
self.got_timeout.store(true, AtomicOrdering::Relaxed);
|
self.got_timeout.store(true, AtomicOrdering::Relaxed);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user