Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix some warns on nightly #8889

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ethcore/src/engines/authority_round/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ const ENGINE_TIMEOUT_TOKEN: TimerToken = 23;

impl IoHandler<()> for TransitionHandler {
fn initialize(&self, io: &IoContext<()>) {
let remaining = self.step.inner.duration_remaining().as_millis();
let remaining = AsMillis::as_millis(&self.step.inner.duration_remaining());
io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(remaining))
.unwrap_or_else(|e| warn!(target: "engine", "Failed to start consensus step timer: {}.", e))
}
Expand All @@ -725,7 +725,7 @@ impl IoHandler<()> for TransitionHandler {
// NOTE we might be lagging by couple of steps in case the timeout
// has not been called fast enough.
// Make sure to advance up to the actual step.
while self.step.inner.duration_remaining().as_millis() == 0 {
while AsMillis::as_millis(&self.step.inner.duration_remaining()) == 0 {
self.step.inner.increment();
self.step.can_propose.store(true, AtomicOrdering::SeqCst);
if let Some(ref weak) = *self.client.read() {
Expand All @@ -735,7 +735,7 @@ impl IoHandler<()> for TransitionHandler {
}
}

let next_run_at = self.step.inner.duration_remaining().as_millis() >> 2;
let next_run_at = AsMillis::as_millis(&self.step.inner.duration_remaining()) >> 2;
io.register_timer_once(ENGINE_TIMEOUT_TOKEN, Duration::from_millis(next_run_at))
.unwrap_or_else(|e| warn!(target: "engine", "Failed to restart consensus step timer: {}.", e))
}
Expand Down