diff --git a/ethcore/res/authority_round.json b/ethcore/res/authority_round.json
index 30df3c2be..ad23b461f 100644
--- a/ethcore/res/authority_round.json
+++ b/ethcore/res/authority_round.json
@@ -4,7 +4,7 @@
"AuthorityRound": {
"params": {
"gasLimitBoundDivisor": "0x0400",
- "stepDuration": "1000",
+ "stepDuration": "1",
"authorities" : [
"0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
"0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1"
diff --git a/ethcore/src/engines/authority_round.rs b/ethcore/src/engines/authority_round.rs
index 6730c2aac..57276d354 100644
--- a/ethcore/src/engines/authority_round.rs
+++ b/ethcore/src/engines/authority_round.rs
@@ -18,6 +18,7 @@
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
use std::sync::Weak;
+use std::time::{UNIX_EPOCH, Duration};
use common::*;
use ethkey::verify_address;
use rlp::{UntrustedRlp, View, encode, decode};
@@ -36,7 +37,7 @@ pub struct AuthorityRoundParams {
/// Gas limit divisor.
pub gas_limit_bound_divisor: U256,
/// Time to wait before next block or authority switching.
- pub step_duration: u64,
+ pub step_duration: Duration,
/// Valid authorities.
pub authorities: Vec
,
/// Number of authorities.
@@ -47,7 +48,7 @@ impl From for AuthorityRoundParams {
fn from(p: ethjson::spec::AuthorityRoundParams) -> Self {
AuthorityRoundParams {
gas_limit_bound_divisor: p.gas_limit_bound_divisor.into(),
- step_duration: p.step_duration.into(),
+ step_duration: Duration::from_secs(p.step_duration.into()),
authority_n: p.authorities.len(),
authorities: p.authorities.into_iter().map(Into::into).collect::>(),
}
@@ -62,12 +63,23 @@ pub struct AuthorityRound {
builtins: BTreeMap,
transistion_service: IoService,
message_channel: Mutex