Stop authoring blocks when offline (#1655)

* Don't author blocks when offline

* Increased canonicalization delay

* Fixed test
This commit is contained in:
Arkadiy Paronyan
2019-02-01 17:17:53 +01:00
committed by Gav Wood
parent 2155e44e13
commit 641bb7cb46
7 changed files with 26 additions and 2 deletions
+5
View File
@@ -272,6 +272,11 @@ pub fn start_aura<B, C, E, I, SO, Error>(
}
};
if sync_oracle.is_offline() && authorities.len() > 1 {
debug!(target: "aura", "Skipping proposal slot. Waiting for the netork.");
return Either::B(future::ok(()));
}
let proposal_work = match slot_author(slot_num, &authorities) {
None => return Either::B(future::ok(())),
Some(author) => if author.0 == public_key.0 {