diff --git a/substrate/consensus/src/import_queue.rs b/substrate/consensus/src/import_queue.rs index bf9b2ceb..a6a2b154 100644 --- a/substrate/consensus/src/import_queue.rs +++ b/substrate/consensus/src/import_queue.rs @@ -120,13 +120,13 @@ where .client .justifications(&BlockId::Number(best)) .unwrap() - .unwrap() - .get(CONSENSUS_ID) - .unwrap() + .map(|justifications| justifications.get(CONSENSUS_ID).cloned().unwrap()) + .unwrap_or_default() .as_ref(), ) - .unwrap() - .end_time, + .map(|commit| commit.end_time) + // TODO: Genesis start time + .unwrap_or(0), ), import_clone .get_proposal(&import_clone.client.header(BlockId::Number(0u8.into())).unwrap().unwrap()) diff --git a/substrate/node/src/service.rs b/substrate/node/src/service.rs index b4f402a6..0feba075 100644 --- a/substrate/node/src/service.rs +++ b/substrate/node/src/service.rs @@ -1,4 +1,7 @@ -use std::{sync::{Arc, RwLock}, future::Future}; +use std::{ + sync::{Arc, RwLock}, + future::Future, +}; use sp_core::H256; diff --git a/substrate/tendermint/src/lib.rs b/substrate/tendermint/src/lib.rs index 4a6a3884..0a1ac8a8 100644 --- a/substrate/tendermint/src/lib.rs +++ b/substrate/tendermint/src/lib.rs @@ -272,7 +272,7 @@ impl TendermintMachine { timeouts: HashMap::new(), }; - machine.round_propose(); + machine.round(Round(0)); loop { // Check if any timeouts have been triggered